summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2021-01-08 14:15:37 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2021-01-08 14:15:37 +0100
commit55e3061bfd713c4197e568e07bc0542f30a39970 (patch)
treec0056f0e7dbf3ab53190f6967bae2a82ee86fb80
parent95d9dcc870148eae0b48883a6b567f642e8e8603 (diff)
downloadalpine-conf-55e3061bfd713c4197e568e07bc0542f30a39970.zip
setup-hostname: use ask for consistency
-rw-r--r--setup-hostname.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/setup-hostname.in b/setup-hostname.in
index 3ce7dd2..3c43dab 100644
--- a/setup-hostname.in
+++ b/setup-hostname.in
@@ -58,9 +58,9 @@ fi
HOST="$name"
while [ -z "$name" ]; do
HOST=$(hostname)
- echon "Enter system hostname (short form, e.g. 'foo') [$HOST]: "
- default_read HOST "$HOST"
- if valid_hostname "$HOST"; then
+ ask "Enter system hostname (short form, e.g. 'foo')" "$HOST"
+ if valid_hostname "$resp"; then
+ HOST="$resp"
break
fi
done