script to be executed on system startup.

Ivan Voras ivoras at
Thu Feb 7 10:17:06 UTC 2008

RW wrote:
> On Wed, 06 Feb 2008 15:55:12 +0100
> Ivan Voras <ivoras at> wrote:
>> I've seen some complicated examples on this thread, and want to
>> suggest a simple one:
>> 1. create a regular shell script in /etc/rc.d, n
>> ..
>> A more semantically pure example (and the one that's preferred if your
>> script starts an external application - a web server or something like
>> that) is to put the script in /usr/local/etc/rc.d. In any case, the
>> syntax and everything else is the same.
> This is a bit muddled.
> /etc/rc.d is for system RCNG scripts.
> /usr/local/etc/rc.d is for local RCNG scripts and legacy scripts

You are right - I was trying to simplify it too much.

> that simply respond to stop/start in $1. Legacy scripts end in .sh and
> are called from /etc/rc.d/localpkg in dictionary order.
> Since the OP appears to have such a script it should be given a ".sh"
> extension and placed in /usr/local/etc/rc.d, not in /etc/rc.d. 

Thanks for the clarification!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url :

More information about the freebsd-questions mailing list