conf/91759: rc.d/ntpd should REQUIRE devfs

Helge Oldach freebsdntpd at oldach.net
Fri Jan 13 08:40:06 PST 2006


>Number:         91759
>Category:       conf
>Synopsis:       rc.d/ntpd should REQUIRE devfs
>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:   Fri Jan 13 16:40:04 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Helge Oldach
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
>Environment:

System: FreeBSD localhost 5.4-STABLE FreeBSD 5.4-STABLE #593: Fri Jan 13 10:51:44 CET 2006 toor at localhost:/usr/obj/usr/src/sys/HMO i386

>Description:

rc.d/ntpd should REQUIRE devfs for supporting device entries for
reference clocks.

ntpd(8) has the ability to directly parse the protocols of external
clocks attached to the system. For instance, I am using a dumb DCF-77
receiver which is physically attached to /dev/cuaa1.

Unfortunately the appropriate device names are hardcoded into ntpd; in
my case it is /dev/refclock-0. Hence I need a symlink from refclock-0
to cuaa1 which is achieved most conveniently through a line in
/etc/devfs.conf:

	# ntpd
	link	cuaa1	refclock-0

Hence rc.d/devfs must be run before rc.d/ntpd. Otherwise there is a race
between rc.d/devfs and rc.d/ntpd which may cause ntpd to coredump. The
trivial patch below achieves this.

This also applies to 6-STABLE and CURRENT.

>How-To-Repeat:

>Fix:

--- etc/rc.d/ntpd~	Sun Oct 10 15:40:13 2004
+++ etc/rc.d/ntpd	Fri Jan 13 10:13:00 2006
@@ -5,7 +5,7 @@
 #
 
 # PROVIDE: ntpd
-# REQUIRE: DAEMON
+# REQUIRE: DAEMON devfs
 # BEFORE:  LOGIN
 # KEYWORD: nojail
 

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list