From nobody@FreeBSD.org  Sat Jan 12 12:31:36 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E5E1416A46B
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 12 Jan 2008 12:31:36 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id C7A9F13C4D9
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 12 Jan 2008 12:31:36 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m0CCUQ7l032516
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 12 Jan 2008 12:30:26 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m0CCUQgj032515;
	Sat, 12 Jan 2008 12:30:26 GMT
	(envelope-from nobody)
Message-Id: <200801121230.m0CCUQgj032515@www.freebsd.org>
Date: Sat, 12 Jan 2008 12:30:26 GMT
From: Renaud Waldura <renaud+freebsd@waldura.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Changes to rc.d/ntpd prevent no-config startup
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         119592
>Category:       conf
>Synopsis:       Recent changes to rc.d/ntpd prevent no-config startup [regression]
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    flz
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 12 12:40:01 UTC 2008
>Closed-Date:    Mon May 19 09:22:10 UTC 2008
>Last-Modified:  Mon May 19 09:22:10 UTC 2008
>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@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@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:
Responsible-Changed-From-To: freebsd-bugs->flz 
Responsible-Changed-By: flz 
Responsible-Changed-When: Jeu 7 fv 2008 12:52:34 UTC 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=119592 
State-Changed-From-To: open->feedback 
State-Changed-By: flz 
State-Changed-When: Jeu 7 fv 2008 13:12:18 UTC 
State-Changed-Why:  
Awaiting feedback. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=119592 

From: "Florent Thoumie" <flz@FreeBSD.org>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: conf/119592: Recent changes to rc.d/ntpd prevent no-config startup (regression)
Date: Thu, 7 Feb 2008 12:50:55 +0000

 Removing "required_files" from the rc script seem to fix it. Can you
 make sure it works as expected with this change?
 
 -- 
 Florent Thoumie
 flz@FreeBSD.org
 FreeBSD Committer
State-Changed-From-To: feedback->patched 
State-Changed-By: flz 
State-Changed-When: Mon May 12 11:49:27 UTC 2008 
State-Changed-Why:  
Committed to HEAD. MFC to RELENG_[67] after a week. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=119592 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/119592: commit references a PR
Date: Mon, 12 May 2008 11:49:23 +0000 (UTC)

 flz         2008-05-12 11:49:16 UTC
 
   FreeBSD src repository
 
   Modified files:
     etc/rc.d             ntpd 
   Log:
   Don't require a configuration file. Ntpd will be perfectly happy if there's
   none or if the file doesn't exist (there's no ntp.conf in the base install).
   
   PR:             conf/119592
   Submitted by:   Renaud Waldura <renaud+freebsd@waldura.org>
   MFC after:      1 week
   
   Revision  Changes    Path
   1.14      +0 -2      src/etc/rc.d/ntpd
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: flz 
State-Changed-When: Mon May 19 09:22:10 UTC 2008 
State-Changed-Why:  
MFC'ed to RELENG_[67]. Thanks! 

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