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

RW rwmaillists at googlemail.com
Wed Jun 20 13:02:45 UTC 2012


On Wed, 20 Jun 2012 08:02:48 -0400
Jerry wrote:

> 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 ":".

We were talking about the null command colon at the bottom of the
script, not the colons in comments at the top.


More information about the freebsd-questions mailing list