Hello everybody, Before FreeBSD 6.1, I was able to write a rc script which modifies the rc.conf file. All rc scripts exectuted after this first one would use the new rc.conf then. To make this work, I put the script in /etc/rc.d/ and "tagged" it with "BEFORE: rcconf". Unfortunately, rcconf has been removed in FreeBSD 6.1 (or -STABLE?). I have tried many different ways, like "BEFORE:NETWORKING", and others. But none seems to work. I even overwrote "rc.diskless", but still no luck. What is the correct way for 6-STABLE to achieve what I want to do? (i.e. write the rc.conf from a rc script) Thanks in advance, M.
> What is the correct way for 6-STABLE to achieve what I want to do? > (i.e. write the rc.conf from a rc script)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.
On Tue, Jun 20, 2006 at 06:50:39PM +0200, M.Hirsch wrote:> One question remains though: > > How can I make my script to be the very first rc script to be executed?Add appropriate BEFORE entries so it is before all unparented scripts. -- Brooks -- Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20060620/9ab1e1a7/attachment.pgp
Another problem solved :) So when my script overwrote rc.conf, the file was already loaded and thus overwriting it had no effect. That's why it didn't work. (not with "BEFORE: initrandom" either). This must have changed somewhen between 6.0 and 6-STABLE because it did work in 6.0. Thanks vm. I'm going to publish a "freebsd 6 remote deployment" article on my blog after I got it working 100%. There really don't seem to be any good and recent guides for that out there... M. [LoN]Kamikaze schrieb:>BTW, rc.subr only loads rc.conf if it hasn't already been loaded. > > >