Date: Wed, 20 Jun 2012 14:02:40 +0100 From: RW <rwmaillists@googlemail.com> To: freebsd-questions@freebsd.org Subject: Re: seems i cannot fully understand {/,/usr/local/}/etc/rc.d/* Message-ID: <20120620140240.6b6f660a@gumby.homeunix.com> In-Reply-To: <20120620080248.7f3cb6c9@scorpio> References: <alpine.BSF.2.00.1206201020550.40030@wojtek.tensor.gdynia.pl> <4FE18D93.4060809@FreeBSD.org> <20120620124729.7f50b781@gumby.homeunix.com> <20120620080248.7f3cb6c9@scorpio>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120620140240.6b6f660a>