startup scripts in /usr/local/etc/rc.d

Lowell Gilbert freebsd-questions-local at be-well.ilk.org
Fri Dec 12 04:39:38 PST 2003


Andre Grove <ondrugs at ananzi.co.za> writes:

> Why would a script not run? I have a script in /usr/local/etc/rc.d, I
> did chmod +x it, but it still does not run at startup.

You didn't give much information there.  Not feeling terribly psychic
today, I'll just tell you what the manual says.

     o   Scripts are only executed if their basename(1) matches the shell
         globbing pattern *.sh, and they are executable.  Any other files or
         directories present within the directory are silently ignored.
     o   When a script is executed at boot time, it is passed the string
         ``start'' as its first and only argument.  At shutdown time, it is
         passed the string ``stop'' as its first and only argument.  All rc.d
         scripts are expected to handle these arguments appropriately.  If no
         action needs to be taken at a given time (either boot time or shut-
         down time) the script should exit successfully and without producing
         an error message.


More information about the freebsd-questions mailing list