diff options
author | Ilya Lipnitskiy | 2015-10-12 18:21:03 -0700 |
---|---|---|
committer | Ilya Lipnitskiy | 2015-10-12 18:52:17 -0700 |
commit | 76f148506a0ed8528d48b8482436fa5064a9c7ab (patch) | |
tree | a6e4e198f03b53a665c553257e8d7d13434cd9a6 /10-ntpdconf | |
download | aur-networkmanager-dispatcher-ntpdconf.tar.gz |
Initial commit
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 |