Question about current rc scripts
M.Hirsch
M.Hirsch at gmx.de
Tue Jun 20 16:38:07 UTC 2006
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.
>
>
More information about the freebsd-stable
mailing list