From owner-freebsd-rc@FreeBSD.ORG Mon Jan 24 11:02:13 2005 Return-Path: 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 7E00416A4D7 for ; Mon, 24 Jan 2005 11:02:13 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 65ED043D5A for ; Mon, 24 Jan 2005 11:02:13 +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.1/8.13.1) with ESMTP id j0OB2D28018978 for ; Mon, 24 Jan 2005 11:02:13 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0OB2CHG018972 for freebsd-rc@freebsd.org; Mon, 24 Jan 2005 11:02:12 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 24 Jan 2005 11:02:12 GMT Message-Id: <200501241102.j0OB2CHG018972@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 Subject: Current problem reports assigned to you X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 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, 24 Jan 2005 11:02:13 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- a [2004/03/09] kern/63954 rc devfs loses permissions 1 problem total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2003/08/29] conf/56144 rc [PATCH] /etc/rc.d/ipmon, /etc/rc.d/ipfilt 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 3 problems total. From owner-freebsd-rc@FreeBSD.ORG Wed Jan 26 14:46:40 2005 Return-Path: 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 6C4C516A4CE for ; Wed, 26 Jan 2005 14:46:40 +0000 (GMT) Received: from mailhub01.unibe.ch (mailhub01.unibe.ch [130.92.9.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E07643D48 for ; Wed, 26 Jan 2005 14:46:40 +0000 (GMT) (envelope-from roth@droopy.unibe.ch) Received: from localhost (scanhub03-eth0.unibe.ch [130.92.254.67]) by mailhub01.unibe.ch (Postfix) with ESMTP id BEEC325BA66 for ; Wed, 26 Jan 2005 15:46:38 +0100 (MET) Received: from mailhub01.unibe.ch ([130.92.9.52]) by localhost (scanhub03.unibe.ch [130.92.254.67]) (amavisd-new, port 10024) with LMTP id 26863-02-10 for ; Wed, 26 Jan 2005 15:46:34 +0100 (CET) Received: from asterix.unibe.ch (asterix.unibe.ch [130.92.64.4]) by mailhub01.unibe.ch (Postfix) with ESMTP id 82B7325BAC9 for ; Wed, 26 Jan 2005 15:46:37 +0100 (MET) Received: from droopy.unibe.ch (droopy [130.92.64.20]) by asterix.unibe.ch (8.11.7p1+Sun/8.11.7) with ESMTP id j0QEkbU25605 for ; Wed, 26 Jan 2005 15:46:37 +0100 (MET) Received: (from roth@localhost) by droopy.unibe.ch (8.12.10+Sun/8.12.9/Submit) id j0QEkmbQ013356 for freebsd-rc@freebsd.org; Wed, 26 Jan 2005 15:46:48 +0100 (MET) Date: Wed, 26 Jan 2005 15:46:48 +0100 From: Tobias Roth To: freebsd-rc@freebsd.org Message-ID: <20050126144648.GA13291@droopy.unibe.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-message-flag: Warning! Using Outlook is insecure and promotes virus distribution. Please use a different email client. X-Virus-checked: by University of Berne Subject: rc.d scripts with multiple arguments X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 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, 26 Jan 2005 14:46:40 -0000 Hi I have an rc.d/ scripts in the works that would benefit from a second argument, eg /etc/rc.d/myscript start foobar As it looks, this is not possible with the current mechanism of run_rc_command(). So my questions: 1) is there already a corrct way to do this? 2) would it make sense of not using run_rc_command() and doing the argument handling in the script itself, therefore allowing multiple arguments? or would this be a stupid idea and against the design of rcng? I can live without this, but if it's somehow possible, it would be nice. Also, if this would theoretically make sense, but rcng doesn't allow it yet, I might have go at improving rcng in this direction. thanks, t. From owner-freebsd-rc@FreeBSD.ORG Wed Jan 26 16:32:32 2005 Return-Path: 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 7295816A4DC for ; Wed, 26 Jan 2005 16:32:32 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E00643D31 for ; Wed, 26 Jan 2005 16:32:32 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j0QGXcBL016010; Wed, 26 Jan 2005 08:33:38 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j0QGXcTL016009; Wed, 26 Jan 2005 08:33:38 -0800 Date: Wed, 26 Jan 2005 08:33:38 -0800 From: Brooks Davis To: Tobias Roth Message-ID: <20050126163338.GA12288@odin.ac.hmc.edu> References: <20050126144648.GA13291@droopy.unibe.ch> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zhXaljGHf11kAtnf" Content-Disposition: inline In-Reply-To: <20050126144648.GA13291@droopy.unibe.ch> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: freebsd-rc@freebsd.org Subject: Re: rc.d scripts with multiple arguments X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 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, 26 Jan 2005 16:32:32 -0000 --zhXaljGHf11kAtnf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 26, 2005 at 03:46:48PM +0100, Tobias Roth wrote: > Hi >=20 > I have an rc.d/ scripts in the works that would benefit from a second > argument, eg /etc/rc.d/myscript start foobar >=20 > As it looks, this is not possible with the current mechanism of > run_rc_command(). So my questions: >=20 > 1) is there already a corrct way to do this? > 2) would it make sense of not using run_rc_command() and doing the > argument handling in the script itself, therefore allowing multiple > arguments? or would this be a stupid idea and against the design of > rcng? >=20 > I can live without this, but if it's somehow possible, it would be nice. > Also, if this would theoretically make sense, but rcng doesn't allow it > yet, I might have go at improving rcng in this direction. Take a look at /etc/rc.d/netif for a script that does this. You do have to do the stop and start bits yourself in this case. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --zhXaljGHf11kAtnf Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFB98ZhXY6L6fI4GtQRAnnJAJ4+F86IawMWNWyASKZvs1Qb+7+pGACdHYpe UJS1aF1GJ29+6kB9FEHQr6A= =hPrE -----END PGP SIGNATURE----- --zhXaljGHf11kAtnf-- From owner-freebsd-rc@FreeBSD.ORG Fri Jan 28 09:01:01 2005 Return-Path: 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 A0B8D16A4CE for ; Fri, 28 Jan 2005 09:01:01 +0000 (GMT) Received: from telecom.net.et (sparrow.telecom.net.et [213.55.64.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 576B343D4C for ; Fri, 28 Jan 2005 09:00:58 +0000 (GMT) (envelope-from mtm@identd.net) Received: from [213.55.68.154] (HELO rogue.smit.lan) by telecom.net.et (CommuniGate Pro SMTP 3.4.8) with ESMTP id 71689015; Fri, 28 Jan 2005 11:53:02 +0300 Received: by rogue.smit.lan (Postfix, from userid 1000) id 369E1B81E; Fri, 28 Jan 2005 12:01:17 +0300 (EAT) Date: Fri, 28 Jan 2005 12:01:16 +0300 From: Mike Makonnen To: Tobias Roth Message-ID: <20050128090116.GA7490@rogue.smit.lan> References: <20050126144648.GA13291@droopy.unibe.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050126144648.GA13291@droopy.unibe.ch> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD/6.0-CURRENT (i386) cc: freebsd-rc@freebsd.org Subject: Re: rc.d scripts with multiple arguments X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 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, 28 Jan 2005 09:01:01 -0000 On Wed, Jan 26, 2005 at 03:46:48PM +0100, Tobias Roth wrote: > Hi > > I have an rc.d/ scripts in the works that would benefit from a second > argument, eg /etc/rc.d/myscript start foobar > > As it looks, this is not possible with the current mechanism of > run_rc_command(). So my questions: > > 1) is there already a corrct way to do this? This functionality is available. Take a look at rc.d/netif and rc.d/moused to see how it is used. Cheers. -- Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc mtm@identd.net | Fingerprint: AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55 mtm@FreeBSD.Org| FreeBSD - Unleash the Daemon ! From owner-freebsd-rc@FreeBSD.ORG Sat Jan 29 02:43:11 2005 Return-Path: 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 F0C1216A4CE for ; Sat, 29 Jan 2005 02:43:11 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id B213543D2F for ; Sat, 29 Jan 2005 02:43:11 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j0T2ikP2025808; Fri, 28 Jan 2005 18:44:46 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j0T2ikA9025807; Fri, 28 Jan 2005 18:44:46 -0800 Date: Fri, 28 Jan 2005 18:44:46 -0800 From: Brooks Davis To: Mike Makonnen Message-ID: <20050129024446.GA21989@odin.ac.hmc.edu> References: <20041008223214.GA4501@odin.ac.hmc.edu> <20041014100429.GA1626@rogue.acs.lan> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0OAP2g/MAC+5xKAE" Content-Disposition: inline In-Reply-To: <20041014100429.GA1626@rogue.acs.lan> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: rc@freebsd.org Subject: Re: review request: early rc.d scripts X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 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, 29 Jan 2005 02:43:12 -0000 --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 14, 2004 at 01:04:30PM +0300, Mike Makonnen wrote: > Sorry for the late reply. I meant to reply to this sooner but > forgot about it. Some how I missed this reply back in October and then got distracted from this work. > I generally don't like multiple runs of rcorder(8) since this > can potentially make the system fragile. This is because an early script > gets run twice, and if the script doesn't do sanity checking the second > time round it could break things (rc.d/var comes to mind). I realize that > the keyword is currently only in two rc.d scripts, but having the > functionality available invites use in other scripts. The scripts at NOT run twice because they are skipped by "-s early" being added to the skip variable. There's a slight cost in rescanning /etc/rc.d twice but in the common case everything will be in the cache the second time through. > Secondly, this seems to me to be of limited use to the majority of > FreeBSD users. I can't think of a single instance in the past where > I wished I had this functionality. However, you certainly want it, so > there will probably be others that could use it too :-) Given teh minimal cost, I'm not sure I buy this. > Given my reservations I would really prefer you keep > it as a local hack or find a different mechanism. However, if you really > want it in the base system it should be behind an rc.conf knob that > defaults to off so that those people who don't use it won't be > affected by it. I think something like this should be in the base system because the current situation badly violates POLA. You can put rc.d scripts under /conf and you'll see them when you log in, but they don't run. The real problem is that initdiskless probably should not have been made in to an rc.d script in the first place. It's setting up /etc so the rcorder run is too early. I can't put this under an rc.conf variable know because there may well not be an /etc/rc.conf in existance at this point. An alternative would be to move initdiskless back to /etc and run it explicitly before rcorder. That might be the best approach. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --0OAP2g/MAC+5xKAE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFB+vibXY6L6fI4GtQRAuWGAJ4xFg8ZujIDm+BgSidQAPxGnrsYvACguTha +J/swTxGle9R6hBkgANOpb8= =gPEz -----END PGP SIGNATURE----- --0OAP2g/MAC+5xKAE--