Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Feb 2008 18:46:04 +0000
From:      RW <fbsd06@mlists.homeunix.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: script to be executed on system startup.
Message-ID:  <20080206184604.62b6ac6d@gumby.homeunix.com.>
In-Reply-To: <fochm5$gre$1@ger.gmane.org>
References:  <1563a4fd0802060609j59451879h3920be790d7667c0@mail.gmail.com> <fochm5$gre$1@ger.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 06 Feb 2008 15:55:12 +0100
Ivan Voras <ivoras@freebsd.org> 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. 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080206184604.62b6ac6d>