summarylogtreecommitdiffstats
path: root/10-ntpdconf
diff options
context:
space:
mode:
authorIlya Lipnitskiy2015-10-12 18:21:03 -0700
committerIlya Lipnitskiy2015-10-12 18:52:17 -0700
commit76f148506a0ed8528d48b8482436fa5064a9c7ab (patch)
treea6e4e198f03b53a665c553257e8d7d13434cd9a6 /10-ntpdconf
downloadaur-networkmanager-dispatcher-ntpdconf.tar.gz
Initial commit
Diffstat (limited to '10-ntpdconf')
-rw-r--r--10-ntpdconf14
1 files changed, 14 insertions, 0 deletions
diff --git a/10-ntpdconf b/10-ntpdconf
new file mode 100644
index 00000000000..4baadc46089
--- /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