misc/119592: Changes to rc.d/ntpd prevent no-config startup
Renaud Waldura
renaud+freebsd at waldura.org
Sat Jan 12 04:40:01 PST 2008
>Number: 119592
>Category: misc
>Synopsis: Changes to rc.d/ntpd prevent no-config startup
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Jan 12 12:40:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Renaud Waldura
>Release: 6.1 and 6.2
>Organization:
BioHazard Networks
>Environment:
FreeBSD ebola.biohz.net 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Sun May 7 04:42:56 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386
FreeBSD alobe.biohz.net 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 11:05:30 UTC 2007 root at dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386
>Description:
In FreeBSD 6.1, one could startup ntpd without a configuration file, by providing all configuration information using command-line parameters in rc.conf. This is used for broadcast clients for example. (The recommended architecture for NTP is to have a local time server that provides time service to clients using multicast/broadcast.)
In 6.2, changes made to rc.d/ntpd now require a configuration file. Default install does not come with a configuration file. The configuration file can be edited using rc.conf variables, but this can be tricky (see "How to repeat" section.)
The offending changes are highlighted here:
http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/rc.d/ntpd?annotate=1.13
Thank you!
>How-To-Repeat:
Default install of FreeBSD 6.2.
Add the following to /etc/rc.conf:
ntpd_enable=YES
ntpd_flags="$ntpd_flags -A -b"
# rc.d/ntpd
=> startup error, required config file not found
ntpd_enable=YES
ntpd_flags="$ntpd_flags -A -b"
ntpd_config=
# rc.d/ntpd
=> startup error, bad syntax
ntpd_enable=YES
ntpd_flags="$ntpd_flags -A -b"
ntpd_config=/dev/null
# rc.d/ntpd
=> OK
>Fix:
Options:
1- set default config file to /dev/null
or 2- create empty config file /etc/ntp.conf in default install
or 3- fix startup script rc.d/ntpd to allow no config file
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list