Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Mar 2007 21:07:52 +0000
From:      RW <fbsd06@mlists.homeunix.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: /usr/local/etc/rc.d startup scripts
Message-ID:  <20070307210752.60a1db77@gumby.homeunix.com>
In-Reply-To: <20070307194009.GL86959@dan.emsphone.com>
References:  <00f901c760ea$9461ce40$0700020a@mickey> <20070307194009.GL86959@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 7 Mar 2007 13:40:09 -0600
Dan Nelson <dnelson@allantgroup.com> wrote:

> In the last episode (Mar 07), Don O'Neil said:
> > Are there any special naming requirements for scripts in
> > /usr/local/etc/rc.d for 6.1?
> > 
> > Someone is telling me they need to have a .sh suffix to startup
> > correctly, but in past versions of FreeBSD anything you put in there
> > would run as long as it was executable.
> 
> Scripts in /usr/local/etc/rc.d are processed using a two-pass method.
> New rc.subr-style scripts are detected by the presence of a 
> "# PROVIDE:" line, and are ordered based on dependencies listed in
> REQUIRE and BEFORE lines.  Old-style scripts have to end in *.sh, and
> are run in alphabetical order after new scripts.  Files not ending in
> .sh without a PROVIDE: line are ignored.
> 

An RcNG script that ends in .sh is sourced into the current shell
rather than executed in a new one. This allows you to bring down the
entire boot process. Assuming this behaviour applies to local RcNG
scripts too, it's best to avoid the .sh suffix. 



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