Date: Tue, 20 Jun 2006 18:38:01 +0200 From: "M.Hirsch" <M.Hirsch@gmx.de> To: stable@FreeBSD.org Cc: Pete French <petefrench@ticketswitch.com> Subject: Re: Question about current rc scripts Message-ID: <44982469.9050008@gmx.de> In-Reply-To: <E1Fsj3P-0007mN-BE@dilbert.firstcallgroup.co.uk> References: <E1Fsj3P-0007mN-BE@dilbert.firstcallgroup.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
I have investigated a bit more. Setting the variables can't work. As far as I can see, rc.conf is sourced from rc.subr. And every single script in /etc/rc.d/ sources rc.subr, so they reload the rc.conf file for each call. The "rc" scripts are being executed in a sub-shell though. So overwriting variables in any of them will have no effect on the following files. It does work for /usr/local/etc/rc.d though, but I really need it to execute before anything else. I made it work by overwriting rc.diskless (again). Stupid /me, rc.diskless does not follow the syntax for rc scripts. It's just a "normal" shell script :) Anyways, I would still be interested in the "correct" way to do it. M. Pete French schrieb: >I thought rc.conf was simply a script that set some variables. If >this is the case then you don't need to overwrite it - you simply need to >make your script set the appropriate variables and then drop it in as >a repplacement for rc.conf - hence no need to rewrite rc.conf at all. > >-pcf. > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44982469.9050008>