From owner-freebsd-rc@FreeBSD.ORG Sat Mar 8 15:38:06 2008 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F6441065675 for ; Sat, 8 Mar 2008 15:38:06 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (grnl-static-02-0046.dsl.iowatelecom.net [69.66.56.110]) by mx1.freebsd.org (Postfix) with ESMTP id 17CA48FC1A for ; Sat, 8 Mar 2008 15:38:05 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.1/8.13.8) with ESMTP id m28FblHx058970; Sat, 8 Mar 2008 09:37:47 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.2/8.14.2/Submit) id m28FbkVX058969; Sat, 8 Mar 2008 09:37:46 -0600 (CST) (envelope-from brooks) Date: Sat, 8 Mar 2008 09:37:46 -0600 From: Brooks Davis To: d@delphij.net Message-ID: <20080308153746.GB58790@lor.one-eyed-alien.net> References: <47D1DE64.20405@delphij.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZoaI/ZTpAVc4A5k6" Content-Disposition: inline In-Reply-To: <47D1DE64.20405@delphij.net> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Sat, 08 Mar 2008 09:37:47 -0600 (CST) Cc: mtm@freebsd.org, freebsd-rc@freebsd.org Subject: Re: [RFC] Split nextboot deletion from /etc/rc.d/root 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, 08 Mar 2008 15:38:06 -0000 --ZoaI/ZTpAVc4A5k6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 07, 2008 at 04:31:32PM -0800, Xin LI wrote: > Hi, >=20 > Here is a patch that moves the nextboot deletion from /etc/rc.d/root to a= =20 > new script which would be fired after mountlate. The reason behind this = is=20 > that /boot is not necessarily part of the /, and doing nextboot -D would= =20 > give an error if /boot is not mounted (i.e. in a typical setup of ZFS=20 > root). >=20 > Objections? This seems somewhat risky in that delaying removal of the nextboot file mea= ns crashes under moderate load (like running rc.d) will be harder to recover f= rom. What about doing it both places? -- Brooks > Cheers, > --=20 > Xin LI http://www.delphij.net/ > FreeBSD - The Power to Serve! > Index: Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /home/ncvs/src/etc/rc.d/Makefile,v > retrieving revision 1.89 > diff -u -p -r1.89 Makefile > --- Makefile 5 Mar 2008 18:32:58 -0000 1.89 > +++ Makefile 8 Mar 2008 00:14:00 -0000 > @@ -23,7 +23,7 @@ FILES=3D DAEMON FILESYSTEMS LOGIN NETWORKI > mixer motd mountcritlocal mountcritremote mountlate \ > mdconfig mdconfig2 mountd moused mroute6d mrouted msgs \ > named natd netif netoptions \ > - network_ipv6 newsyslog nfsclient nfsd \ > + network_ipv6 newsyslog nextboot nfsclient nfsd \ > nfsserver nisdomain nsswitch ntpd ntpdate \ > othermta \ > pf pflog pfsync \ > Index: root > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /home/ncvs/src/etc/rc.d/root,v > retrieving revision 1.16 > diff -u -p -r1.16 root > --- root 8 Dec 2007 07:20:22 -0000 1.16 > +++ root 8 Mar 2008 00:13:42 -0000 > @@ -30,12 +30,6 @@ root_start() > esac > =20 > umount -a >/dev/null 2>&1 > - > - # If we booted a special kernel remove the record > - # so we will boot the default kernel next time. > - if [ -x /sbin/nextboot ]; then > - /sbin/nextboot -D > - fi > } > =20 > load_rc_config $name > Index: nextboot > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: nextboot > diff -N nextboot > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ nextboot 8 Mar 2008 00:14:21 -0000 > @@ -0,0 +1,26 @@ > +#!/bin/sh > +# > +# $FreeBSD$ > +# > + > +# PROVIDE: nextboot > +# REQUIRE: mountlate > +# KEYWORD: nojail > + > +. /etc/rc.subr > + > +name=3D"nextboot" > +start_cmd=3D"nextboot_start" > +stop_cmd=3D":" > + > +nextboot_start() > +{ > + # If we booted a special kernel remove the record > + # so we will boot the default kernel next time. > + if [ -x /sbin/nextboot ]; then > + /sbin/nextboot -D > + fi > +} > + > +load_rc_config $name > +run_rc_command "$1" > _______________________________________________ > freebsd-rc@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-rc > To unsubscribe, send any mail to "freebsd-rc-unsubscribe@freebsd.org" --ZoaI/ZTpAVc4A5k6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iD8DBQFH0rLKXY6L6fI4GtQRAmNUAKCd4OuiB5/bLQMZMTi+T1zVZGINKQCgyZvo H4UNagZb61CJ6vBXj5UGKUo= =3WFX -----END PGP SIGNATURE----- --ZoaI/ZTpAVc4A5k6--