Date: Sat, 21 Dec 2002 12:38:15 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: Jake Burkholder <jake@locore.ca> Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/etc rc.diskless1 Message-ID: <200212212038.gBLKcFUY075250@apollo.backplane.com> References: <200212210030.gBL0U8mj092252@repoman.freebsd.org> <20021221051202.A19933@locore.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
:> do other cleanups. :> :> (documentation and man page updates to follow). : :Do you intend to make these changes in the rcng scripts in etc/rc.d as well? :rcng is the default in -current so I can't see this getting much testing. : :Jake : :> :> MFC after: 3 days :> :> Revision Changes Path :> 1.18 +152 -72 src/etc/rc.diskless1 Ok, I hit a problem with the RCNG stuff. The problem is that reloading the rc.conf files is not enough... RCNG unconditionally loads the original (incorrect) rc.conf file before it runs any scripts. This creates massive leakage from the server's own rc.conf's into the diskless client's rc.conf's. In order to fix the problem we cannot unconditionally load_rc_config in /etc/rc. Instead, load_rc_config must itself be a dependancy in rc.d. I have included the adjustments below for review. Basically I add rc.d/rcconf which depends on initdiskless, then any other rc files with no REQUIRE lines depend on rcconf. I have not included changes to the 'initdiskless' and 'diskless' scripts, they are basically just the rc.diskless* work I've been doing placed in an rc.d environment, with fixes (things like kenv being used before /usr is mounted and other problems). -Matt Matthew Dillon <dillon@backplane.com> Index: rc =================================================================== RCS file: /home/ncvs/src/etc/rc,v retrieving revision 1.324 diff -u -r1.324 rc --- rc 18 Dec 2002 07:21:30 -0000 1.324 +++ rc 21 Dec 2002 20:30:26 -0000 @@ -69,10 +69,10 @@ [Yy][Ee][Ss]) . /etc/rc.subr - # Load system configuration files. The 'XXX' is there because - # the function requires an argument that we don't need to use. + # Note: the system configuration files are loaded as part of + # the RCNG system. Do not load them here as it may interfere + # with some functions (like diskless booting). # - load_rc_config 'XXX' if [ "$1" = autoboot ]; then autoboot=yes Index: rc.d/ccd =================================================================== RCS file: /home/ncvs/src/etc/rc.d/ccd,v retrieving revision 1.2 diff -u -r1.2 ccd --- rc.d/ccd 13 Jun 2002 22:14:36 -0000 1.2 +++ rc.d/ccd 21 Dec 2002 20:23:39 -0000 @@ -4,6 +4,7 @@ # $FreeBSD: src/etc/rc.d/ccd,v 1.2 2002/06/13 22:14:36 gordon Exp $ # +# REQUIRE: rcconf # PROVIDE: disks # KEYWORD: FreeBSD NetBSD Index: rc.d/devd =================================================================== RCS file: /home/ncvs/src/etc/rc.d/devd,v retrieving revision 1.2 diff -u -r1.2 devd --- rc.d/devd 30 Nov 2002 00:40:53 -0000 1.2 +++ rc.d/devd 21 Dec 2002 20:24:10 -0000 @@ -3,6 +3,7 @@ # $FreeBSD: src/etc/rc.d/devd,v 1.2 2002/11/30 00:40:53 imp Exp $ # +# REQUIRE: rcconf # PROVIDE: devd # BEFORE: disks # KEYWORD: FreeBSD Index: rc.d/initrandom =================================================================== RCS file: /home/ncvs/src/etc/rc.d/initrandom,v retrieving revision 1.1 diff -u -r1.1 initrandom --- rc.d/initrandom 13 Jun 2002 22:14:36 -0000 1.1 +++ rc.d/initrandom 21 Dec 2002 20:25:50 -0000 @@ -4,7 +4,7 @@ # # PROVIDE: initrandom -# REQUIRE: initdiskless +# REQUIRE: rcconf # BEFORE: disks # KEYWORD: FreeBSD Index: rc.d/raidframe =================================================================== RCS file: /home/ncvs/src/etc/rc.d/raidframe,v retrieving revision 1.2 diff -u -r1.2 raidframe --- rc.d/raidframe 13 Jun 2002 22:14:36 -0000 1.2 +++ rc.d/raidframe 21 Dec 2002 20:27:10 -0000 @@ -4,6 +4,7 @@ # $FreeBSD: src/etc/rc.d/raidframe,v 1.2 2002/06/13 22:14:36 gordon Exp $ # +# REQUIRE: rcconf # PROVIDE: disks . /etc/rc.subr Index: rc.d/rcconf =================================================================== RCS file: rc.d/rcconf diff -N rc.d/rcconf --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ rc.d/rcconf 21 Dec 2002 20:30:50 -0000 @@ -0,0 +1,10 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: rcconf +# REQUIRE: initdiskless +# KEYWORD: FreeBSD NetBSD + +load_rc_config 'XXX' Index: rc.d/vinum =================================================================== RCS file: /home/ncvs/src/etc/rc.d/vinum,v retrieving revision 1.1 diff -u -r1.1 vinum --- rc.d/vinum 13 Jun 2002 22:14:36 -0000 1.1 +++ rc.d/vinum 21 Dec 2002 20:28:43 -0000 @@ -3,6 +3,7 @@ # $FreeBSD: src/etc/rc.d/vinum,v 1.1 2002/06/13 22:14:36 gordon Exp $ # +# REQUIRE: rcconf # PROVIDE: disks # KEYWORD: FreeBSD To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212212038.gBLKcFUY075250>