summaryrefslogtreecommitdiff
path: root/setup-disk.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2021-01-08 11:59:21 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2021-01-08 11:59:21 +0100
commitb30471b7542e55bba4de98b75c9b0e0c25e072bd (patch)
tree486b872223acd72c9f84e6e372658089ffe1289f /setup-disk.in
parent634b6c09fd8e9fb5d3489d29c2ab9e07b93426e5 (diff)
downloadalpine-conf-b30471b7542e55bba4de98b75c9b0e0c25e072bd.zip
setup-disk: use ask for consistency
Diffstat (limited to 'setup-disk.in')
-rw-r--r--setup-disk.in7
1 files changed, 3 insertions, 4 deletions
diff --git a/setup-disk.in b/setup-disk.in
index 18ff96b..954f245 100644
--- a/setup-disk.in
+++ b/setup-disk.in
@@ -175,9 +175,8 @@ unpack_apkovl() {
ovlfiles=/tmp/ovlfiles
if [ "$suffix" = "gz" ]; then
if ! tar -C "$dest" --numeric-owner -zxvf "$ovl" > $ovlfiles; then
- echo -n "Continue anyway? [Y/n]: "
- read i
- case "$i" in
+ ask "Continue anyway? (y/n)"
+ case "$resp" in
n*|N*) return 1;;
esac
fi
@@ -744,7 +743,7 @@ confirm_erase() {
fi
echo "WARNING: The following disk(s) will be erased:"
show_disk_info $@
- echo -n "WARNING: Erase the above disk(s) and continue? [y/N]: "
+ ask "WARNING: Erase the above disk(s) and continue? (y/n)" n
read answer
case "$answer" in