Date: Wed, 28 Sep 2005 14:59:43 +1000 From: "John Marshall" <John.Marshall@riverwillow.com.au> To: <freebsd-rc@freebsd.org> Subject: Add ntpdate_hosts to rc.conf Message-ID: <9F7B653A50CF3D45A92C05401046239B059A5E@rwsrv06.rw2.riverwillow.net.au>
next in thread | raw e-mail | index | archive | help
Request: Please add "ntpdate_hosts" to /etc/defaults/rc.conf Context: FreeBSD 5.4-RELEASE-p7 i386 Reasons: - The /etc/rc.d/ntpdate script looks for it - It's missing from rc.conf - It's not documented - Adding the hosts to the existing "ntpdate_flags" variable produces unexpected results. Background: To the uninitiated, the only apparent "standard" tweaking mechanisms for any startup script appear to be those included in rc.conf. For ntpdate, the only tweaks presented in the defaults file are: - ntpdate_enable - ntpdate_program - ntpdate_flags If the list of hosts is appended to ntpdate_flags (where else would it go?), then the ntpdate startup script uses them but also appends any hosts listed as servers in /etc/ntp.conf. The script does this because it didn't find any hosts via ntpdate_hosts, it doesn't know that you supplied the hosts via the ntpdate_flags mechanism, it knows that there's no point running without pointing at any hosts, so it goes and finds some from ntp.conf. In a scenario where the ntp.conf hosts are not accessible until after the system startup has finished, this will stall the startup. If an empty ntpdate_hosts is added to rc.conf, then people will know which mechanism to use. An empty ntpdate_hosts list variable will still result in the ntpdate script looking in ntp.conf, so no harm done there. A populated ntpdate_hosts list variable keeps the startup script away from ntp.conf and uses only the listed hosts. Something like the following in /etc/defaults/rc.conf would make this a whole lot more intuitive. ntpdate_hosts=3D"" # (use hosts from /etc/ntp.conf if blank) Thank you for listening. John Marshall Sydney, NSW, Australia
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9F7B653A50CF3D45A92C05401046239B059A5E>