Quick question about NTP configuration

I know that normally the NTP client/server configuration options are defined in /etc/config/system or in Luci which basically just automates changing the former. I also know from here that, more generally, the /etc/config options are used by scripts in /etc/init.d to build up command line options for their respective programs at run time.

My questions is: If I installed the ntpd package and disabled the built in NTP client/server, does the init script for the stand-alone ntpd package also parse /etc/config for command options? Because if so, it seems there would be alot of missed possible config options that are not in /etc/config/system. I would assume that ntpd in openwrt, just like in another linux distro, would check if /etc/ntp.conf existed, and use it if so. I know other packages have similar functionally (things like dnsmasq come to mind). However, I just built an image for a x86 pc with ntpd, and I do not see a config file anywhere except for the boilerplate stuff in /etc/config that is normally used for the built in daemon. No /etc/ntp.conf, etc...
The wiki does give a basic outline of a ntp.conf style config file here, but conspicuously says nothing about where or how it is parsed.

I did confirm that ntpdc, ntpd.hotplug-helper, and ntpq all exist in /usr/sbin so can anyone provide some guidance? Thanks

From /etc/init.d/ntpd

if [ -d "/etc/ntpd.d" ]; then
                local entry
                for entry in "/etc/ntpd.d"/*.conf; do
                        emit "includefile ${entry}\n"
                done
fi

Create a directory /etc/ntpd.d and insert your additional custom options in /etc/ntpd.d/myntp.conf or something.

3 Likes