summaryrefslogtreecommitdiff
path: root/setup-ntp.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2022-07-01 11:51:35 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2022-07-01 10:15:32 +0000
commit8730da8aeb5abb42e7f29ed767680d9f5258fb06 (patch)
treedf9a0942bff1d2639615318db1cb8b3451751fd4 /setup-ntp.in
parent5e8175705911c1daf54d527b93c2c304afd3c507 (diff)
downloadalpine-conf-8730da8aeb5abb42e7f29ed767680d9f5258fb06.zip
setup-ntp: fix non-interactive -c option
We should not prompt user when -c is specified, in which case $1 is empty. fixes https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10522
Diffstat (limited to 'setup-ntp.in')
-rw-r--r--setup-ntp.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/setup-ntp.in b/setup-ntp.in
index af35e05..9f48d72 100644
--- a/setup-ntp.in
+++ b/setup-ntp.in
@@ -27,7 +27,7 @@ while getopts "hc:" opt; do
done
shift $(( $OPTIND - 1 ))
-resp=$1
+: ${resp:=$1}
while [ $# -eq 0 ] && ! isin "$resp" busybox openntpd chrony none abort; do
ask "Which NTP client to run? ('busybox', 'openntpd', 'chrony' or 'none')" chrony