aboutsummaryrefslogtreecommitdiff
path: root/hooks/50-ntp.conf
diff options
context:
space:
mode:
Diffstat (limited to 'hooks/50-ntp.conf')
-rw-r--r--hooks/50-ntp.conf6
1 files changed, 3 insertions, 3 deletions
diff --git a/hooks/50-ntp.conf b/hooks/50-ntp.conf
index 046ab6b33a06..cbaa374408bb 100644
--- a/hooks/50-ntp.conf
+++ b/hooks/50-ntp.conf
@@ -43,7 +43,7 @@ fi
# Debian has a separate file for DHCP config to avoid stamping on
# the master.
-if [ "$ntp_service" = ntpd ] && type invoke-rc.d >/dev/null 2>&1; then
+if [ "$ntp_service" = ntpd ] && command -v invoke-rc.d >/dev/null 2>&1; then
[ -e /var/lib/ntp ] || mkdir /var/lib/ntp
: ${ntp_service:=ntp}
: ${NTP_DHCP_CONF:=/var/lib/ntp/ntp.conf.dhcp}
@@ -113,7 +113,7 @@ add_ntp_conf()
[ -e "$cf" ] && rm "$cf"
[ -d "$ntp_conf_dir" ] || mkdir -p "$ntp_conf_dir"
if [ -n "$new_ntp_servers" ]; then
- for x in $new_ntp_servers; do
+ for x in $(uniqify $new_ntp_servers); do
echo "server $x" >> "$cf"
done
fi
@@ -131,7 +131,7 @@ remove_ntp_conf()
# For ease of use, map DHCP6 names onto our DHCP4 names
case "$reason" in
BOUND6|RENEW6|REBIND6|REBOOT6|INFORM6)
- new_ntp_servers="$new_dhcp6_sntp_servers"
+ new_ntp_servers="$new_dhcp6_sntp_servers $new_dhcp6_ntp_server_addr $new_dhcp6_ntp_server_fqdn"
;;
esac