From owner-freebsd-current Fri Nov 8 19:35:14 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 216DA37B401 for ; Fri, 8 Nov 2002 19:35:12 -0800 (PST) Received: from mail.identd.net (matrix.identd.net [64.172.21.201]) by mx1.FreeBSD.org (Postfix) with SMTP id 20B5843E75 for ; Fri, 8 Nov 2002 19:35:11 -0800 (PST) (envelope-from mtm@identd.net) Received: (qmail 6754 invoked by uid 1007); 9 Nov 2002 03:35:06 -0000 Date: Fri, 8 Nov 2002 19:35:06 -0800 From: Mike Makonnen To: current@freebsd.org Subject: Re: rc.d and sysctl.conf Message-ID: <20021109033506.GB6608@matrix.identd.net> References: <200210302236.OAA26726@windsor.research.att.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CUfgB8w4ZwR/yMy5" Content-Disposition: inline In-Reply-To: <200210302236.OAA26726@windsor.research.att.com> User-Agent: Mutt/1.4i X-Operating-System: FreeBSD/4.7-STABLE (i386) Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --CUfgB8w4ZwR/yMy5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 30, 2002 at 02:36:01PM -0800, Bill Fenner wrote: [ snip ] > > The update to the /etc/rc.d infrastructure keeps the ability to run > twice, but does not actually run it twice. I started creating an > /etc/rc.d/sysctl-last that would run "/etc/rc.d/sysctl lastload", > but realized that I didn't know how to say where the first/second > call should go. To strictly follow /etc/rc.d, I could change the > existing /etc/rc.d/sysctl to say "BEFORE: serial" and add "BEFORE: > securelevel" to sysctl-last, but I'm not sure this is appropriate given > the meta-checkpoints that we have. One of the hard things while I was doing the porting was deciding whether something in /etc/rc was there because it *must* run before the commands that were after it and after the commands that came before it. Since there haven't been any complaints in that regard I don't think the current order has broken anything. The general rule is to put something in REQUIRE and/or BEFORE only if it is necessary that some script be run before or after the current script. So, if the sysctls *must* be set before SERIAL, it should be in the BEFORE line. Otherwise, I would leave it as is and run `/etc/rc.d/sysctl lastload' in /etc/rc.d/securelevel just before rasing the securelevel (Please see the attached patch). > > (It also raises the question of if /etc/rc.d/securelevel actually > runs at the right time. /etc/rc puts it almost at the absolute end, > while rcorder sticks it somewhere in the middle -- number 67 of 102 > on my system.) We wanted to keep the differences between our scripts and NetBSD's to a minimum. So, if it turns out we've broken something because of where rcorder puts the securelevel script, then we'll have to modify the BEFORE line of the affected script. Cheers, Mike --=20 GPG Key: http://www.identd.net/~mtm/gpg.key pub 1024D/7D39509A 2002-10-08 Mike Makonnen Key fingerprint =3D 5491 488A 0445 2DCC 777B 1F03 F3AB F9F8 7D39 509A --CUfgB8w4ZwR/yMy5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE9zIJo86v5+H05UJoRAj6NAKC8EB4iQ/SzHVzvAW1q8ikwfScMpQCfWePo f2OAlcN4aTii6H3vbGxjKCw= =wIKO -----END PGP SIGNATURE----- --CUfgB8w4ZwR/yMy5-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message