Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Jan 2006 17:28:55 +0100 (CET)
From:      Helge Oldach <freebsdntpd@oldach.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   conf/91759: rc.d/ntpd should REQUIRE devfs
Message-ID:  <200601131628.k0DGSt3r046036@sep.oldach.net>
Resent-Message-ID: <200601131640.k0DGe5Mw095758@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601131628.k0DGSt3r046036>