aboutsummaryrefslogtreecommitdiffstats
path: root/50-ntpdate
blob: f9e980a61370f478f25fe99dbd6097db710eb2a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
# Sync time from pool.ntp.org as soon as connection is up
 
case "${reason}" in
	BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT|STATIC)
		# this reads nameserver from /etc/ntp.conf
		ntpd -q
		# alternatively use ntpdate and give hostname
		#ntpdate -u pool.ntp.org
		;;
	PREINIT|EXPIRE|FAIL|IPV4LL|NAK|NOCARRIER|RELEASE|STOP)
		# do nothing here...
		;;
esac