From freebsdntpd@oldach.net  Fri Jan 13 16:33:37 2006
Return-Path: <freebsdntpd@oldach.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0692516A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 13 Jan 2006 16:33:37 +0000 (GMT)
	(envelope-from freebsdntpd@oldach.net)
Received: from sep.oldach.net (sep.oldach.net [194.180.25.6])
	by mx1.FreeBSD.org (Postfix) with ESMTP id AD3EE43D5C
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 13 Jan 2006 16:33:27 +0000 (GMT)
	(envelope-from freebsdntpd@oldach.net)
Received: from sep.oldach.net (localhost [127.0.0.1])
	by sep.oldach.net (8.13.4/8.13.4/hmo26jun05) with ESMTP id k0DGXPIg046412
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 13 Jan 2006 17:33:25 +0100 (CET)
	(envelope-from freebsdntpd@oldach.net)
Received: (from hmo@localhost)
	by sep.oldach.net (8.13.4/8.13.4/Submit/hmo26jun05) id k0DGXPZa046411
	for FreeBSD-gnats-submit@freebsd.org; Fri, 13 Jan 2006 17:33:25 +0100 (CET)
	(envelope-from freebsdntpd@oldach.net)
Received: from sep.oldach.net (localhost [127.0.0.1])
	by sep.oldach.net (8.13.4/8.13.4/hmo26jun05) with ESMTP id k0DGT0vg046048
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Fri, 13 Jan 2006 17:29:00 +0100 (CET)
	(envelope-from hmo@sep.oldach.net)
Received: (from hmo@localhost)
	by sep.oldach.net (8.13.4/8.13.4/Submit/hmo26jun05) id k0DGSt3r046036;
	Fri, 13 Jan 2006 17:28:55 +0100 (CET)
	(envelope-from hmo)
Message-Id: <200601131628.k0DGSt3r046036@sep.oldach.net>
Date: Fri, 13 Jan 2006 17:28:55 +0100 (CET)
From: Helge Oldach <freebsdntpd@oldach.net>
Reply-To: Helge Oldach <freebsdntpd@oldach.net>
To: FreeBSD-gnats-submit@freebsd.org
Subject: rc.d/ntpd should REQUIRE devfs
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         91759
>Category:       conf
>Synopsis:       rc.d/ntpd should REQUIRE devfs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dougb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 13 16:40:04 GMT 2006
>Closed-Date:    Tue Jan 17 07:22:19 GMT 2006
>Last-Modified:  Tue Jan 17 07:22:19 GMT 2006
>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:

From: Matteo Riondato <matteo@freebsd.org>
To: Helge Oldach <freebsdntpd@oldach.net>
Cc: FreeBSD-gnats-submit@FreeBSD.org, dougb@freebsd.org
Subject: Re: conf/91759: rc.d/ntpd should REQUIRE devfs
Date: Fri, 13 Jan 2006 17:59:25 +0100

 This was fixed in revision 1.12 on HEAD, December 21th 2005.
 You can ask dougb@ (CC'ed) to MFC it to RELENG_6 and RELENG_5
 Best Regards
 -- 
 Matteo Riondato
 FreeBSD Volunteer (http://freebsd.org)
 G.U.F.I. Staff Member (http://www.gufi.org)
 FreeSBIE Developer (http://www.freesbie.org)
State-Changed-From-To: open->patched 
State-Changed-By: linimon 
State-Changed-When: Fri Jan 13 20:38:59 UTC 2006 
State-Changed-Why:  
Set as MFC reminder. 


Responsible-Changed-From-To: freebsd-bugs->dougb 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Jan 13 20:38:59 UTC 2006 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=91759 
State-Changed-From-To: patched->closed 
State-Changed-By: dougb 
State-Changed-When: Tue Jan 17 07:21:22 UTC 2006 
State-Changed-Why:  

I just MFC'ed the change to RELENG_6, I do not intend 
to MFC it to RELENG_5. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=91759 
>Unformatted:
