seems i cannot fully understand {/,/usr/local/}/etc/rc.d/*

Jerry jerry at seibercom.net
Wed Jun 20 12:02:53 UTC 2012


On Wed, 20 Jun 2012 12:47:29 +0100
RW articulated:

> On Wed, 20 Jun 2012 09:45:07 +0100
> Matthew Seaman wrote:
> 
> > #!/bin/sh
> > #
> > # Persuade vboxheadless to start before samba.
> > 
> > # PROVIDE: precedence
> > # REQUIRE: vboxheadless
> > # BEFORE: samba
> > 
> > :
> > 
> > Make it executable.  Note -- the ':' does seem to be necessary.
> 
> Why? None of the dummy scripts in the base system have a ":".

From "man rc"

EXAMPLES
     The following is a minimal rc.d/ style script.  Most scripts require lit-
     tle more than the following.

           #!/bin/sh
           #

           # PROVIDE: foo
           # REQUIRE: bar_service_required_to_precede_foo

           . /etc/rc.subr

           name="foo"
           rcvar=`set_rcvar`
           command="/usr/local/bin/foo"

           load_rc_config $name
           run_rc_command "$1"

You will notice the prominent use of ":". If you feel that is in error,
please feel free to submit a PR against it.

-- 
Jerry ♔

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__________________________________________________________________



More information about the freebsd-questions mailing list