]>
git.saurik.com Git - apple/launchd.git/blob - launchd/src/StartupItems/NetworkTime
11 if [ "${TIMESYNC:=-YES-}" = "-YES-" ] &&
12 ! GetPID ntpd
> /dev
/null
; then
16 if [ -f /var
/run
/NetworkTime.StartupItem
-o "${NETWORKUP}" = "-NO-" ]; then exit; fi
17 touch /var
/run
/NetworkTime.StartupItem
20 echo "Starting network time synchronization"
22 # Synchronize our clock to the network's time,
23 # then fire off ntpd to keep the clock in sync.
25 ntpd
-f /var
/run
/ntp.drift
-p /var
/run
/ntpd.pid
31 if pid
=$(GetPID ntpd); then
32 echo "Stopping network time synchronization"
35 echo "ntpd is not running."
37 rm -f /var
/run
/NetworkTime.StartupItem
40 RestartService
() { StopService
; StartService
; }