On Tue, 14 Jun 2005, Michael W. Lucas wrote:


I'm certain this is documented somewhere, but danged if I can find it.

I have a whole variety of custom scripts in /usr/local/etc/rc.d.  For
years now, simply giving them a name ending in .sh and making them
executable has been sufficient to make them start on boot.

On 5.x, it's not.  And now, having upgraded to 4.11-s on some older
boxes and running portupgrade -a, it's not.

Obviously these scripts need something else.  There's no fancy rcNG
infrastructure in them; is rcNG a requirement for startup scripts now?
Any pointers on where I can find the right documentation?


You might want to look at `man rc.d`. There are example scripts there.

When I went to 5.x I updated all of my rc.d scripts to use what's labeled there as the "old style" format like:

The following is a simple, hypothetical example of an old-style
/usr/local/etc/rc.d/ script, which would start a daemon at boot time, and kill it at shutdown time.

     #!/bin/sh -
     #
     #    initialization/shutdown script for foobar package

     case "$1" in
     start)
             /usr/local/sbin/foo -d && echo -n ' foo'
             ;;
     stop)
             kill `cat /var/run/foo.pid` && echo -n ' foo'
             ;;
     *)
             echo "unknown option: $1 - should be 'start' or 'stop'" >&2
             ;;
     esac


SEE ALSO
     kill(1), rc.conf(5), init(8), rcorder(8), rc.subr(8), reboot(8),
     savecore(8)

HISTORY
     The rc utility appeared in 4.0BSD.

FreeBSD 5.4                  November 4, 2002              FreeBSD 5.4




       | Mitch Parks * [EMAIL PROTECTED] |

   "I bring you love and deeper understanding."
                - Kate Bush
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to