RFC: Alternate patch to have true new-style rc.d scripts in ports (without touching localpkg)

Mike Makonnen mtm at identd.net
Sat Jul 31 08:44:07 PDT 2004


On Sat, Jul 31, 2004 at 07:33:03PM +0400, Andrey Chernov wrote:
> On Sat, Jul 31, 2004 at 06:19:44PM +0300, Mike Makonnen wrote:
> > scripts that have a .sh, and those that don't. If you really want
> > your script to be sourced in the same shell, then you give it a
> > .sh extension. Otherwise, it will be sourced in a subshell. So, when
> 
> It can make things even worse, what if someone rename his rc.subr-ed 
> script.sh to script.sh.old ? It was common practice in the past to not 
> execute anything without .sh at all.

I think I already answered this in a previous thread, but here goes again.
If it is an old style script (not rc.d) then it gets executed only if it
has a .sh extension and it is executable. That has NOT changed.
If it is an rc.d script then it gets executed only if the appropriate
foo_enable knob is turned on.

Cheers.
-- 
Mike Makonnen  | GPG-KEY: http://www.identd.net/~mtm/mtm.asc
mtm at identd.net | Fingerprint: AC7B 5672 2D11 F4D0 EBF8  5279 5359 2B82 7CD4 1F55
mtm at FreeBSD.Org| FreeBSD - Unleash the Daemon !


More information about the freebsd-rc mailing list