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

Matthew Seaman m.seaman at infracaninophile.co.uk
Wed Jun 20 12:39:48 UTC 2012


On 20/06/2012 12:47, RW wrote:
> 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 ":".

It seems I was mistaken.  As far as rcorder goes, an empty script is
just as good as a single null command:

% cat precedence
#!/bin/sh
#
# Persuade postgresql to start before spamassassin.

# PROVIDE: precedence
# REQUIRE: postgresql
# BEFORE: spamd

% rcorder /etc/rc.d/* /usr/local/etc/rc.d/* | grep -E
'postgresql|precedence|sa-spamd'
/usr/local/etc/rc.d/postgresql
/usr/local/etc/rc.d/precedence
/usr/local/etc/rc.d/sa-spamd

Hey -- I saved a whole two bytes.  Woohoo!

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matthew at infracaninophile.co.uk               Kent, CT11 9PW



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20120620/ff35cb16/signature.pgp


More information about the freebsd-questions mailing list