diff options
-rw-r--r-- | setup-ntp.in | 2 | ||||
-rwxr-xr-x | tests/setup_ntp_test | 17 |
2 files changed, 17 insertions, 2 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 diff --git a/tests/setup_ntp_test b/tests/setup_ntp_test index 8294232..6746277 100755 --- a/tests/setup_ntp_test +++ b/tests/setup_ntp_test @@ -6,7 +6,9 @@ init_tests \ setup_ntp_invalid \ setup_ntp_busybox \ setup_ntp_chrony \ - setup_ntp_openntpd + setup_ntp_openntpd \ + setup_ntp_none \ + setup_ntp_none_backwards_compat setup_ntp_usage_body() { test_usage setup-ntp @@ -43,3 +45,16 @@ setup_ntp_openntpd_body() { -o match:"Starting openntpd" \ setup-ntp openntpd } + +setup_ntp_none_body() { + init_env + atf_check -s exit:0 \ + setup-ntp none +} + +setup_ntp_none_backwards_compat_body() { + init_env + atf_check -s exit:0 \ + setup-ntp -c none +} + |