# Force ntp-based update of system clock in shell



## michaelsanford (Jul 27, 2008)

My battery's dead and upon resetting the PMU, or unplugging my iBook from the wall, the system clock resets. For some silly reason, getting the latest time from the system-configured ntp server doesn't happen at boot.

How do I force ntp update on boot? I can assume that I'm plugged into ethernet before I boot, so not having a network connection is essentially never going to happen.

Thanks!


----------



## mosx86 (Jul 28, 2008)

Have you tried HUP'ing ntpd?

something like...

sudo killall -HUP ntpd


----------



## michaelsanford (Jul 30, 2008)

I suppose I could hup ntpd, but I was hoping for a "more elegant" solution (if one exists!)

One problem with that is that I've spent so much time in Slackware recently that I've forgotten where the equivalent rc.local file is on OS X :/


----------



## mosx86 (Aug 4, 2008)

michaelsanford said:


> I suppose I could hup ntpd, but I was hoping for a "more elegant" solution (if one exists!)
> 
> One problem with that is that I've spent so much time in Slackware recently that I've forgotten where the equivalent rc.local file is on OS X :/



Launchd is being used to launch ntpd.  But it's actually calling  /usr/libexec/ntpd-wrapper which is just a shell script to launch ntpd with certain parameters.

What's in your ntpd.conf file and what parameters are being flagged via ntpd-wrapper?


----------

