5
PATH=/sbin:/bin:/usr/sbin:/usr/bin
7
# This is a heuristic: The idea is that if a static interface is brought
8
# up, that is a major event, and we can put in some extra effort to fix
9
# the system time. Feel free to change this, especially if you regularly
10
# bring up new network interfaces.
11
if [ "$METHOD" = static ]; then
15
if [ "$METHOD" = loopback ]; then
19
# Check whether ntpdate was removed but not purged; it's useless to wait for
21
if [ ! -x /usr/sbin/ntpdate-debian ] && [ -d /usr/sbin ]; then
27
# This is for the case that /usr will be mounted later.
28
if [ -r /lib/udev/hotplug.functions ]; then
29
. /lib/udev/hotplug.functions
30
wait_for_file /usr/sbin/ntpdate-debian
33
LOCKFILE=/var/lock/ntpdate
35
# Avoid running more than one at a time
36
if [ -x /usr/bin/lockfile-create ]; then
37
lockfile-create $LOCKFILE
38
lockfile-touch $LOCKFILE &
42
/usr/sbin/ntpdate-debian -s $OPTS 2>/dev/null || :
44
if [ -x /usr/bin/lockfile-create ] ; then
46
lockfile-remove $LOCKFILE