From owner-freebsd-rc@FreeBSD.ORG Wed Sep 28 04:59:45 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 63A4A16A41F for ; Wed, 28 Sep 2005 04:59:45 +0000 (GMT) (envelope-from John.Marshall@riverwillow.com.au) Received: from mail.riverwillow.net.au (ns1.riverwillow.net.au [203.58.93.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id B720943D48 for ; Wed, 28 Sep 2005 04:59:44 +0000 (GMT) (envelope-from John.Marshall@riverwillow.com.au) Received: from rwmail.riverwillow.net.au (rwsrv06.rw2.riverwillow.net.au [172.25.25.16]) by mail.riverwillow.net.au (8.13.5/8.13.5) with ESMTP id j8S4xh2C008073 for ; Wed, 28 Sep 2005 14:59:43 +1000 (AEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Date: Wed, 28 Sep 2005 14:59:43 +1000 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Message-ID: <9F7B653A50CF3D45A92C05401046239B059A5E@rwsrv06.rw2.riverwillow.net.au> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Add ntpdate_hosts to rc.conf Thread-Index: AcXD6XBXpzLet4EbQJiUZ2XV2MorGg== From: "John Marshall" To: Subject: Add ntpdate_hosts to rc.conf X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2005 04:59:45 -0000 Request: Please add "ntpdate_hosts" to /etc/defaults/rc.conf Context: FreeBSD 5.4-RELEASE-p7 i386 Reasons: - The /etc/rc.d/ntpdate script looks for it - It's missing from rc.conf - It's not documented - Adding the hosts to the existing "ntpdate_flags" variable produces unexpected results. Background: To the uninitiated, the only apparent "standard" tweaking mechanisms for any startup script appear to be those included in rc.conf. For ntpdate, the only tweaks presented in the defaults file are: - ntpdate_enable - ntpdate_program - ntpdate_flags If the list of hosts is appended to ntpdate_flags (where else would it go?), then the ntpdate startup script uses them but also appends any hosts listed as servers in /etc/ntp.conf. The script does this because it didn't find any hosts via ntpdate_hosts, it doesn't know that you supplied the hosts via the ntpdate_flags mechanism, it knows that there's no point running without pointing at any hosts, so it goes and finds some from ntp.conf. In a scenario where the ntp.conf hosts are not accessible until after the system startup has finished, this will stall the startup. If an empty ntpdate_hosts is added to rc.conf, then people will know which mechanism to use. An empty ntpdate_hosts list variable will still result in the ntpdate script looking in ntp.conf, so no harm done there. A populated ntpdate_hosts list variable keeps the startup script away from ntp.conf and uses only the listed hosts. Something like the following in /etc/defaults/rc.conf would make this a whole lot more intuitive. ntpdate_hosts=3D"" # (use hosts from /etc/ntp.conf if blank) Thank you for listening. John Marshall Sydney, NSW, Australia