diff options
author | Eivind Uggedal <eivind@uggedal.com> | 2014-03-17 12:40:54 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-03-19 12:48:34 +0000 |
commit | b90ed41591963d3ef53b656400dfa584b9eb4b8c (patch) | |
tree | d0670bf8045c26e141ef55d4648df06a416f6ea0 /setup-ntp.in | |
parent | 853ea856c7e7ecf2b350a862a62c167e7fadd7e5 (diff) | |
download | alpine-conf-b90ed41591963d3ef53b656400dfa584b9eb4b8c.zip |
setup-ntp: allow selecting busybox ntpd
Diffstat (limited to 'setup-ntp.in')
-rwxr-xr-x | setup-ntp.in | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/setup-ntp.in b/setup-ntp.in index 38887ce..b544a2a 100755 --- a/setup-ntp.in +++ b/setup-ntp.in @@ -12,7 +12,7 @@ Setup NTP time synchronization options: -h Show this help - -c Choice of NTP daemon: chrony openntpd none + -c Choice of NTP daemon: busybox openntpd chrony none __EOF__ exit 1 } @@ -25,7 +25,7 @@ while getopts "hc:" opt; do done if [ -z "$ntpchoice" ]; then - echo -n "Which NTP client to run? ('openntpd', 'chrony' or 'none') [chrony] " + echo -n "Which NTP client to run? ('busybox', 'openntpd', 'chrony' or 'none') [chrony] " default_read ntpchoice "chrony" fi @@ -35,6 +35,10 @@ case "$ntpchoice" in none|abort) exit 0 ;; +busybox) + pkgs='' + svc=ntpd + ;; chrony) if apk info --installed --quiet acf-core; then pkgs="$pkgs acf-chrony" @@ -42,11 +46,11 @@ chrony) svc=chronyd ;; openntpd) - svc=ntpd + svc=openntpd ;; esac -apk add --quiet $pkgs +[ -z "$pkgs" ] || apk add --quiet $pkgs rc-update add $svc default rc-service $svc start |