From owner-freebsd-rc@FreeBSD.ORG Mon Sep 26 11:02:18 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 BF4FD16A421 for ; Mon, 26 Sep 2005 11:02:18 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 85FA443D48 for ; Mon, 26 Sep 2005 11:02:18 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j8QB2Id1027154 for ; Mon, 26 Sep 2005 11:02:18 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j8QB2H7t027148 for freebsd-rc@freebsd.org; Mon, 26 Sep 2005 11:02:17 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 26 Sep 2005 11:02:17 GMT Message-Id: <200509261102.j8QB2H7t027148@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-rc@FreeBSD.org Cc: Subject: Current problem reports assigned to you 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: Mon, 26 Sep 2005 11:02:19 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2005/02/10] conf/77340 rc awk used in /etc/rc.d/nsswitch when not a 1 problem total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2004/06/30] conf/68525 rc Loader's verbose boot mode has rc.d/local o [2004/07/07] conf/68745 rc /etc/rc.d/devfs runs after ntpd so links o [2005/05/14] kern/81006 rc ipnat not working with tunnel interfaces 3 problems total. 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 From owner-freebsd-rc@FreeBSD.ORG Wed Sep 28 10:52: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 3C10D16A41F for ; Wed, 28 Sep 2005 10:52:45 +0000 (GMT) (envelope-from xfb52@dial.pipex.com) Received: from smtp-out1.blueyonder.co.uk (smtp-out1.blueyonder.co.uk [195.188.213.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id B095643D49 for ; Wed, 28 Sep 2005 10:52:43 +0000 (GMT) (envelope-from xfb52@dial.pipex.com) Received: from [82.41.253.249] ([82.41.253.249]) by smtp-out1.blueyonder.co.uk with Microsoft SMTPSVC(5.0.2195.6713); Wed, 28 Sep 2005 11:53:31 +0100 Message-ID: <433A75FA.9030707@dial.pipex.com> Date: Wed, 28 Sep 2005 11:52:42 +0100 From: Alex Zbyslaw User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-GB; rv:1.7.11) Gecko/20050917 X-Accept-Language: en-us, pl MIME-Version: 1.0 To: John Marshall References: <9F7B653A50CF3D45A92C05401046239B059A5E@rwsrv06.rw2.riverwillow.net.au> In-Reply-To: <9F7B653A50CF3D45A92C05401046239B059A5E@rwsrv06.rw2.riverwillow.net.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 28 Sep 2005 10:53:31.0752 (UTC) FILETIME=[DDB18680:01C5C41A] Cc: freebsd-rc@freebsd.org Subject: Re: 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 10:52:45 -0000 John Marshall wrote: >Request: Please add "ntpdate_hosts" to /etc/defaults/rc.conf > > > Is there a reason you are using ntpdate rather than ntpd? ntpdate is supposedly deprecated and ntpd can do what ntpdate does: -q Exit the ntpd just after the first time the clock is set. This behavior mimics that of the ntpdate(8) program, which is to be retired. The -g and -x options can be used with this option. --Alex From owner-freebsd-rc@FreeBSD.ORG Fri Sep 30 06:55:48 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 3670716A41F for ; Fri, 30 Sep 2005 06:55:48 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mail2.fluidhosting.com [204.14.90.62]) by mx1.FreeBSD.org (Postfix) with SMTP id 6FF1543D48 for ; Fri, 30 Sep 2005 06:55:47 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 84446 invoked by uid 399); 30 Sep 2005 06:55:46 -0000 Received: from mail1.fluidhosting.com (204.14.90.61) by mail2.fluidhosting.com with SMTP; 30 Sep 2005 06:55:46 -0000 Received: (qmail 11639 invoked by uid 399); 30 Sep 2005 06:55:46 -0000 Received: from localhost (HELO ?192.168.1.102?) (dougb@dougbarton.net@127.0.0.1) by localhost with SMTP; 30 Sep 2005 06:55:46 -0000 Message-ID: <433CE171.8080301@FreeBSD.org> Date: Thu, 29 Sep 2005 23:55:45 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Yar Tikhiy References: <20050928164803.GA11556@comp.chem.msu.su> In-Reply-To: <20050928164803.GA11556@comp.chem.msu.su> X-Enigmail-Version: 0.92.1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org, freebsd-rc@FreeBSD.org Subject: Re: Minor issues in our rcNG X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-rc@FreeBSD.org 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: Fri, 30 Sep 2005 06:55:48 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ok, so, this is going to seem like "pick on Yar" night, but it really isn't meant to be. :) We have a list for discussion of issues related to the rc.d system (it's no longer referred to as rcNG), so I'm cc'ing that list, and would ask that you follow up there instead of -arch. Yar Tikhiy wrote: | Hi there, | | The larger issue I'd like to discuss is as follows. Presently, | ${_program} variables are special in that they always override | ${command}. Some rc.d scripts (ab)use this to skip setting ${command}, | e.g., sshd. Some other scripts (ab)use ${_program} despite | they are not just starting ${command} once, e.g., pf, and so make | rc.subr think they have functionality that isn't realy there, such as | poll. Perhaps it's time to separate these two cases in a way? I think that here, and in the rest of the message you've stated the problem you're concerned about well, but I confess that I'm not 100% sure what the negative affects of this problem are. Sorry if I'm being dense here, but before I get excited about this I want to be sure I understand the problem. | I can see two possible approaches. One is to require scripts just | starting a daemon always set ${command}, and to apply the attached | patch to rc.subr. With the patch, ${command} is overridden only | if it was set in the first place. The other approach is to prevent | non-daemon scripts from abusing ${_program}. However, in the | latter case defining ${_program}, e.g., by mistake, still can | affect the script while it should not. | | The second issue is rather small. The rc command "reload" is | supported by code in /etc/rc.subr, but it doesn't appear on the | default list of commands unlike "status" or "poll" when there is | ${pidfile} or ${command} set, and so it is unusable by default. | Scripts have to use ``extra_commands=reload''. In addition, all | this is undocumented. Should "reload" be added to the list of | available commands along with "status" and "poll"? I think this sounds reasonable. Do you have patches for this? | Finally, we have a script named rcconf.sh which doesn't seem | to do anything useful now since all the other scripts invoke | load_rc_config by their own. Can we drop it then? I wouldn't lose sleep over this one, I'm planning to deal with it when I introduce the changes for rcorder in /usr/local/etc/rc.d. Doug - -- ~ This .signature sanitized for your protection -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDPOFxyIakK9Wy8PsRArroAKC6lkrsFVBZVXv+2Cwh+2/F06BEKQCfS70B +ydJ4hsRhsdVuM+KtXEbxfc= =WKZt -----END PGP SIGNATURE----- From owner-freebsd-rc@FreeBSD.ORG Fri Sep 30 10:50:39 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 489D916A41F for ; Fri, 30 Sep 2005 10:50:39 +0000 (GMT) (envelope-from John.Marshall@riverwillow.com.au) Received: from mail2.riverwillow.net.au (ns2.riverwillow.net.au [203.58.93.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id A3CD343D55 for ; Fri, 30 Sep 2005 10:50:36 +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 mail2.riverwillow.net.au (8.13.5/8.13.5) with ESMTP id j8UAoVRZ039721; Fri, 30 Sep 2005 20:50:34 +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: Fri, 30 Sep 2005 20:50:31 +1000 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Message-ID: <9F7B653A50CF3D45A92C05401046239B059A76@rwsrv06.rw2.riverwillow.net.au> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Add ntpdate_hosts to rc.conf Thread-Index: AcXEGsg3fM9sqOTqRxWwVMyOd/0EkABjfA7g From: "John Marshall" To: "Alex Zbyslaw" Cc: freebsd-rc@freebsd.org Subject: RE: 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: Fri, 30 Sep 2005 10:50:39 -0000 > Is there a reason you are using ntpdate rather than ntpd? ntpdate is=20 > supposedly deprecated and ntpd can do what ntpdate does: >=20 > -q Exit the ntpd just after the first time the clock is set. This > behavior mimics that of the ntpdate(8) program, which is to be > retired. The -g and -x options can be used with this option. >=20 > --Alex Perhaps a better question, along the same lines, would be, Why does the FreeBSD RC system use ntpdate? If the idea is to disappear the ntpdate phase from startup, then let's ditch it and add the -g flag as default for ntpd_flags. If ntpdate is staying, for the time being, then it can't hurt to add a missing defaults variable, can it? John. From owner-freebsd-rc@FreeBSD.ORG Fri Sep 30 13:41:28 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 B319416A41F for ; Fri, 30 Sep 2005 13:41:28 +0000 (GMT) (envelope-from xfb52@dial.pipex.com) Received: from smtp-out2.blueyonder.co.uk (smtp-out2.blueyonder.co.uk [195.188.213.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D9FB43D48 for ; Fri, 30 Sep 2005 13:41:27 +0000 (GMT) (envelope-from xfb52@dial.pipex.com) Received: from [82.41.253.249] ([82.41.253.249]) by smtp-out2.blueyonder.co.uk with Microsoft SMTPSVC(5.0.2195.6713); Fri, 30 Sep 2005 14:42:15 +0100 Message-ID: <433D4085.3080904@dial.pipex.com> Date: Fri, 30 Sep 2005 14:41:25 +0100 From: Alex Zbyslaw User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-GB; rv:1.7.11) Gecko/20050917 X-Accept-Language: en-us, pl MIME-Version: 1.0 To: John Marshall References: <9F7B653A50CF3D45A92C05401046239B059A76@rwsrv06.rw2.riverwillow.net.au> In-Reply-To: <9F7B653A50CF3D45A92C05401046239B059A76@rwsrv06.rw2.riverwillow.net.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 30 Sep 2005 13:42:15.0477 (UTC) FILETIME=[C4BADE50:01C5C5C4] Cc: freebsd-rc@freebsd.org Subject: Re: 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: Fri, 30 Sep 2005 13:41:28 -0000 John Marshall wrote: >>Is there a reason you are using ntpdate rather than ntpd? ntpdate is >>supposedly deprecated and ntpd can do what ntpdate does: >> >> >> >Perhaps a better question, along the same lines, would be, Why does the >FreeBSD RC system use ntpdate? > >If the idea is to disappear the ntpdate phase from startup, then let's >ditch it and add the -g flag as default for ntpd_flags. If ntpdate is >staying, for the time being, then it can't hurt to add a missing >defaults variable, can it? > > But ntpdate isn't on by default (not on my 5.4-RELEASE system, anyway). From defaults/rc.conf > ntpdate_enable="NO" # Run ntpdate to sync time on boot (or NO). I'm sure you're right about the variable being missing, but you are still left with the choice of using ntpdate or ntpd. If you choose to use ntpd, your problem goes away. And a second question for you: your problem arises because you apparently have an ntp.conf and then still run ntpdate. Since ntp.conf isn't part of the default install, why do you have it, and with servers defined, if you are running ntpdate? My own bet would be that the whole "parse hosts out of ntp.conf" came from an era before ntpd had the relevant flags. Now that it does, you can disable ntpdate and just run ntpd with the flags you need. --Alex From owner-freebsd-rc@FreeBSD.ORG Sat Oct 1 09:45:35 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 E341316A41F for ; Sat, 1 Oct 2005 09:45:35 +0000 (GMT) (envelope-from John.Marshall@riverwillow.com.au) Received: from mail2.riverwillow.net.au (ns2.riverwillow.net.au [203.58.93.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C91E43D48 for ; Sat, 1 Oct 2005 09:45:34 +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 mail2.riverwillow.net.au (8.13.5/8.13.5) with ESMTP id j919jVFj043866; Sat, 1 Oct 2005 19:45:33 +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: Sat, 1 Oct 2005 19:45:31 +1000 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Message-ID: <9F7B653A50CF3D45A92C05401046239B059A79@rwsrv06.rw2.riverwillow.net.au> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Add ntpdate_hosts to rc.conf Thread-Index: AcXFxK2OELB1yFcJTRiNXqKc4n2KZAAplmMw From: "John Marshall" To: "Alex Zbyslaw" Cc: freebsd-rc@freebsd.org Subject: RE: 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: Sat, 01 Oct 2005 09:45:36 -0000 Alex, > If you choose to use ntpd, your problem goes away.=20 Thank you for your words of wisdom, but I don't have a problem - I solved one. I didn't post to the list in order to start a discussion about ntpd or ntpdate. My only reason for posting was to point out that FreeBSD's ntpdate RC script uses a variable which is not defined in the default rc.conf (and doesn't seem to be documented anywhere). If this is the wrong kind of content for this list - sorry guys. If nobody's interested in taking up my suggestion of fixing this, that's fine too. I just thought I'd try and do the right thing. John. From owner-freebsd-rc@FreeBSD.ORG Sat Oct 1 20:20:11 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 6BDD916A41F for ; Sat, 1 Oct 2005 20:20:11 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mail2.fluidhosting.com [204.14.90.62]) by mx1.FreeBSD.org (Postfix) with SMTP id C8ECD43D48 for ; Sat, 1 Oct 2005 20:20:10 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 32544 invoked by uid 399); 1 Oct 2005 20:20:08 -0000 Received: from mail1.fluidhosting.com (204.14.90.61) by mail2.fluidhosting.com with SMTP; 1 Oct 2005 20:20:08 -0000 Received: (qmail 22317 invoked by uid 399); 1 Oct 2005 20:20:08 -0000 Received: from localhost (HELO ?192.168.1.102?) (dougb@dougbarton.net@127.0.0.1) by localhost with SMTP; 1 Oct 2005 20:20:08 -0000 Message-ID: <433EEF73.6050701@FreeBSD.org> Date: Sat, 01 Oct 2005 13:20:03 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Marshall References: <9F7B653A50CF3D45A92C05401046239B059A79@rwsrv06.rw2.riverwillow.net.au> In-Reply-To: <9F7B653A50CF3D45A92C05401046239B059A79@rwsrv06.rw2.riverwillow.net.au> X-Enigmail-Version: 0.92.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-rc@freebsd.org Subject: Re: 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: Sat, 01 Oct 2005 20:20:11 -0000 John Marshall wrote: > Alex, > > >>If you choose to use ntpd, your problem goes away. > > > Thank you for your words of wisdom, but I don't have a problem - I > solved one. I didn't post to the list in order to start a discussion > about ntpd or ntpdate. > > My only reason for posting was to point out that FreeBSD's ntpdate RC > script uses a variable which is not defined in the default rc.conf (and > doesn't seem to be documented anywhere). > > If this is the wrong kind of content for this list - sorry guys. > > If nobody's interested in taking up my suggestion of fixing this, that's > fine too. I just thought I'd try and do the right thing. Your contribution is appreciated. I am planning to take a look at this soon. Doug -- This .signature sanitized for your protection From owner-freebsd-rc@FreeBSD.ORG Sat Oct 1 20:22:46 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 D326316A41F for ; Sat, 1 Oct 2005 20:22:46 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA16143D45 for ; Sat, 1 Oct 2005 20:22:45 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.3/8.13.3) with ESMTP id j91KMh8c040078 for ; Sun, 2 Oct 2005 00:22:44 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.3/8.13.3/Submit) id j91KMhgY040077 for freebsd-rc@FreeBSD.org; Sun, 2 Oct 2005 00:22:43 +0400 (MSD) (envelope-from yar) Date: Sun, 2 Oct 2005 00:22:43 +0400 From: Yar Tikhiy To: freebsd-rc@FreeBSD.org Message-ID: <20051001202243.GA36764@comp.chem.msu.su> References: <20050928164803.GA11556@comp.chem.msu.su> <433CE171.8080301@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <433CE171.8080301@FreeBSD.org> User-Agent: Mutt/1.5.9i Cc: Subject: Re: Minor issues in our rcNG 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: Sat, 01 Oct 2005 20:22:46 -0000 On Thu, Sep 29, 2005 at 11:55:45PM -0700, Doug Barton wrote: > > Ok, so, this is going to seem like "pick on Yar" night, but it really isn't > meant to be. :) Well, I spent some effort on making that night such, too :-) > We have a list for discussion of issues related to the rc.d system (it's no > longer referred to as rcNG), so I'm cc'ing that list, and would ask that you > follow up there instead of -arch. On the one hand, I'm sorry that I missed the proper list. On the other hand, I'm kind of glad to have attracted some attention to the -rc list, which seems to have been almost ignored by the community lately :-) > Yar Tikhiy wrote: > | > | The larger issue I'd like to discuss is as follows. Presently, > | ${_program} variables are special in that they always override > | ${command}. Some rc.d scripts (ab)use this to skip setting ${command}, > | e.g., sshd. Some other scripts (ab)use ${_program} despite > | they are not just starting ${command} once, e.g., pf, and so make > | rc.subr think they have functionality that isn't realy there, such as > | poll. Perhaps it's time to separate these two cases in a way? > > I think that here, and in the rest of the message you've stated the problem > you're concerned about well, but I confess that I'm not 100% sure what the > negative affects of this problem are. Sorry if I'm being dense here, but > before I get excited about this I want to be sure I understand the problem. The main reason for my being concerned is as follows. I met rc.d, rc.subr and friends quite recently and found that it was a subsystem of a clean design, relatively unpolluted with bugs, undocumented features, or ill side-effects, unlike many other parts of the system. I got so happy with it that even began an article on how to write rc.d scripts (it's mostly complete now.) While writing the article, I had to look deeper into the area, and of course I noticed some oddities, which I'd be glad to fix just to keep this nice little territory free of code junk. This particular issue seems important to me because there are essentially two kinds of variables for an rc.d script to use: those with special meaning to rc.subr(8) and those without such special meaning. IMO, it would be unwise to confuse these kinds of variables and ignore possible ill side-effects. > | I can see two possible approaches. One is to require scripts just > | starting a daemon always set ${command}, and to apply the attached > | patch to rc.subr. With the patch, ${command} is overridden only > | if it was set in the first place. The other approach is to prevent > | non-daemon scripts from abusing ${_program}. However, in the > | latter case defining ${_program}, e.g., by mistake, still can > | affect the script while it should not. > | > | The second issue is rather small. The rc command "reload" is > | supported by code in /etc/rc.subr, but it doesn't appear on the > | default list of commands unlike "status" or "poll" when there is > | ${pidfile} or ${command} set, and so it is unusable by default. > | Scripts have to use ``extra_commands=reload''. In addition, all > | this is undocumented. Should "reload" be added to the list of > | available commands along with "status" and "poll"? I reconsidered the second issue, and the following idea came to my mind. The commands "status" and "poll" can be performed by rc.subr for any rc.d subsystem providing $command because rc.subr can see if the process still is running given as little as the process name. OTOH, "reload" makes sense only in case the process will act respectively upon receiving SIGHUP or another signal, e.g., re-read its configuration files. While this is common, not all daemons do this. Therefore it may be reasonable to keep "reload" out of the default commands. Scripts for subsystems that can do something like reload using the default method will have to specify "reload" in $extra_commands, as it is done already. The whole thing just needs documenting. > I think this sounds reasonable. Do you have patches for this? Patch attached below. > | Finally, we have a script named rcconf.sh which doesn't seem > | to do anything useful now since all the other scripts invoke > | load_rc_config by their own. Can we drop it then? > > I wouldn't lose sleep over this one, I'm planning to deal with it when I > introduce the changes for rcorder in /usr/local/etc/rc.d. Was just nitpicking... -- Yar --- //depot/vendor/freebsd/src/etc/rc.d/ike 2004/10/07 14:36:29 +++ //depot/user/yar/hack/etc/rc.d/ike 2005/10/01 16:51:12 @@ -12,6 +12,7 @@ name="ike" rcvar=`set_rcvar` +command="/usr/local/sbin/isakmpd" extra_commands="reload" load_rc_config $name --- //depot/vendor/freebsd/src/etc/rc.d/named 2005/05/23 12:37:09 +++ //depot/user/yar/hack/etc/rc.d/named 2005/10/01 16:51:12 @@ -13,6 +13,7 @@ name="named" rcvar=`set_rcvar` +command="/usr/sbin/named" start_precmd="named_precmd" start_postcmd="make_symlinks" stop_postcmd="named_poststop" --- //depot/vendor/freebsd/src/etc/rc.d/ppp-user 2004/12/15 13:36:59 +++ //depot/user/yar/hack/etc/rc.d/ppp-user 2005/10/01 08:23:26 @@ -11,6 +11,7 @@ name="ppp" rcvar=`set_rcvar` +command="/usr/sbin/ppp" start_precmd="ppp_precmd" start_postcmd="ppp_postcmd" --- //depot/vendor/freebsd/src/etc/rc.d/sshd 2005/01/16 03:37:14 +++ //depot/user/yar/hack/etc/rc.d/sshd 2005/10/01 16:51:12 @@ -11,6 +11,7 @@ name="sshd" rcvar=`set_rcvar` +command="/usr/sbin/sshd" keygen_cmd="sshd_keygen" start_precmd="sshd_precmd" pidfile="/var/run/${name}.pid" --- //depot/vendor/freebsd/src/etc/rc.subr 2005/09/19 21:36:16 +++ //depot/user/yar/hack/etc/rc.subr 2005/09/19 23:56:24 @@ -493,9 +493,8 @@ esac eval _overide_command=\$${name}_program - if [ -n "$_overide_command" ]; then - command=$_overide_command - fi + _overide_command=${_overide_command:-$command} + command=${command:+$_overide_command} _keywords="start stop restart rcvar $extra_commands" rc_pid=