Archive for October 30, 2012

OpenWRT ntpclient & ntpd

I’ve been very happy with OpenWRT for a long time.  Tonight, I decided I wanted to use it as an NTP server, since I figured it should be capable..  And though this blog entry is pretty short, it took me about an hour to figure this out, searching around… I won’t go into detail about all the things I tried (installing the openntpd package, the ntpd package, etc), but it took a long time for something that turned out to be pretty simple.

OpenWRT includes an ntpclient that works pretty good…  According to some posts I read, you could also turn it into an NTP server by changing the line:

local args=”-n”

to:

local args=”-n -l”

in the /etc/rc.d/S98sysntpd file…

I tried it, rebooted, but it didn’t seem to work…  I still had “ntpclient” running and NOT listening on UDP 123…

Dug into it further, and it appears that S98sysntpd isn’t what was starting ntpclient.  That is started by:

/etc/hotplug.d/iface/20-ntpclient

This is probably a bad way of fixing it, but I added an “exit” near the top of that file, along with a comment about why I did it.  I didn’t want to “permanently” break this, in case I found an issue with using the NTP server and wanted to put this back…

Anyhow, after doing that and rebooting, the S98sysntpd script is able to start ntpd with the option to run as a server.

Hopefully this can save someone else an hour or so…

 

October 30, 2012 at 10:09 pm Leave a comment


Calendar

October 2012
S M T W T F S
 123456
78910111213
14151617181920
21222324252627
28293031  

Posts by Month

Posts by Category