From owner-cvs-all Sun Dec 22 2: 7:57 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 37D9937B401; Sun, 22 Dec 2002 02:07:56 -0800 (PST) Received: from phalanx.trit.org (phalanx.trit.org [63.198.170.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 98E6D43EDC; Sun, 22 Dec 2002 02:07:55 -0800 (PST) (envelope-from dima@trit.org) Received: by phalanx.trit.org (Postfix, from userid 406) id 46EB31A1B2; Sun, 22 Dec 2002 10:07:55 +0000 (UTC) Received: from sparkie.trit.org (sparkie.trit.org [192.168.4.16]) by phalanx.trit.org (Postfix) with ESMTP id 66E1D1A18A; Sun, 22 Dec 2002 10:07:50 +0000 (UTC) Received: (from dima@localhost) by sparkie.trit.org (8.10.2+Sun/8.10.2) id gBMA7nj13264; Sun, 22 Dec 2002 10:07:49 GMT X-Authentication-Warning: sparkie.trit.org: dima set sender to dima@trit.org using -f Date: Sun, 22 Dec 2002 10:07:48 +0000 From: Dima Dorfman To: Matthew Dillon Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/etc rc.diskless1 Message-ID: <20021222100748.GC12728@trit.org> References: <200212210030.gBL0U8mj092252@repoman.freebsd.org> <20021221051202.A19933@locore.ca> <200212212038.gBLKcFUY075250@apollo.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200212212038.gBLKcFUY075250@apollo.backplane.com> User-Agent: Mutt/1.4i X-Spam-Status: No, hits=-3.2 required=10.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01, USER_AGENT,USER_AGENT_MUTT,X_AUTH_WARNING version=2.43 X-Spam-Level: Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Matthew Dillon wrote: > 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. As the one who originally fixed this in rcng with the hack you described, I like your solution much better. One comment, though: > 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' Are you sure this actually works? I believe this script will be run in a subshell, which will not cause the rc.conf stuff loaded here to be propogated to the parent shell. See the comment above run_rc_script() in rc.subr. If I'm wrong about this (it's been a while since I looked at the rcng stuff--it might have changed, or I might not remember the details), please ignore the above paragraph (but not the one above it) :-). Thanks for taking the time to clean this up. Dima. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message