HEADS UP: Please clean out your */etc/rc.d directories

Brooks Davis brooks at one-eyed-alien.net
Thu Dec 22 10:52:28 PST 2005


On Thu, Dec 22, 2005 at 10:45:06AM -0800, John-Mark Gurney wrote:
> Doug Barton wrote this message on Thu, Dec 22, 2005 at 01:50 -0800:
> > I should have said this in my last heads up message, sorry for forgetting 
> > about this important detail. The new code tries to run any script in a 
> > local_startup directory (by default /usr/local/etc/rc.d and 
> > /usr/X11R6/etc/rc.d) that has the execute bit set. So, if there is a script 
> > in one of those directories that you don't want run at all, the safest 
> > thing to do is to create a directory within rc.d, and move the script 
> > there. Parsing of these scripts is not a recursive operation. The second 
> > safest thing to do is to remove the execute bit from those scripts.
> 
> Does this mean that we will remove the .sh extension on port rc.d startup
> scripts?  Because a) it's been only running .sh scripts for quite a
> while, and b) it's really nice and easy to disable scripts by moving
> them to .old or another extension..

Yes.  You should be able to disable any correctly written rc.d script by
setting the variable listed by running "<script> rcvar" to NO in
/etc/rc.conf (and this should be the default).  In 8.0 any scripts
ending in .sh will be run in the context of /etc/rc so they should be
extremely rare and must be very carefully crafted to avoid namespace
pollution.

> Also, how will this effect cups which installs a .sample file?  and
> any other port that does this?

.sample files should go away.  If for some reason a script must
be modified to be useful, the sample version should go under
${PREFIX}/share.

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20051222/72c5cf78/attachment.bin


More information about the freebsd-stable mailing list