diff options
Diffstat (limited to '10-ntpdconf')
-rw-r--r-- | 10-ntpdconf | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/10-ntpdconf b/10-ntpdconf new file mode 100644 index 000000000000..4baadc460896 --- /dev/null +++ b/10-ntpdconf @@ -0,0 +1,14 @@ +#!/bin/bash + +# DHCPv4 +if [ -n "$DHCP4_NTP_SERVERS" ]; then + case "$2" in + dhcp4-change) + ntpd_conf_new=/etc/ntpd.conf + echo "#Generated by NetworkManager dispatcher" > $ntpd_conf_new + for ntp_server in $DHCP4_NTP_SERVERS; do + echo "server $ntp_server" >> $ntpd_conf_new + done + ;; + esac +fi |