summarylogtreecommitdiffstats
path: root/10-ntpdconf
blob: 4baadc460896eb2dc8728d79ea97833e10a7f8fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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