script to be executed on system startup.

RW fbsd06 at
Wed Feb 6 19:03:42 UTC 2008

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
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. 

More information about the freebsd-questions mailing list