seems i cannot fully understand {/,/usr/local/}/etc/rc.d/*

Damien Fleuriot ml at my.gd
Wed Jun 20 12:30:01 UTC 2012



On 6/20/12 11:09 AM, Matthew Seaman wrote:
> On 20/06/2012 09:51, Wojciech Puchar wrote:
>>>
>>> Create a new file in /usr/local/etc/rc.d/precedence with the following
>>> contents:
>>>
>>> #!/bin/sh
>>> #
>>> # Persuade vboxheadless to start before samba.
>>>
>>> # PROVIDE: precedence
>>> # REQUIRE: vboxheadless
>>> # BEFORE: samba
>>>
>>> :
>>>
>>> Make it executable.  Note -- the ':' does seem to be necessary.
>>>
>> thank you for help. I will test it when being on place and could reboot.
>>
>> But still - do you know why it is necessary?
>>
>> cannot i just add BEFORE: samba in vboxheadless?
>>
> 
> Yes, that should work too.  However any time you update vboxheadless
> you'll have to remember to add that modification back to the rc script.
>  Using a separate file stops that being a problem.
> 
> If you want to test that your changes are having the desired effect
> without having to reboot:
> 
>    # rcorder /etc/rc.d/* /usr/local/etc/rc.d/*
> 
> which will print out the order all the rc-scripts would be run.  (It
> includes all the scripts, not just the ones enabled in /etc/rc.conf, but
> that shouldn't matter.)
> 
> 	Cheers,
> 
> 	Matthew
> 

A very helpful post, adding to favorites.


Might that, possibly, warrant a handbook entry ?


More information about the freebsd-questions mailing list