Use of rcorder for local rc.d/*.sh scripts

J.R. Oldroyd fbsd at opal.com
Tue Jun 7 19:11:29 GMT 2005


On Jun 07, 10:37, Brooks Davis wrote:
> >                          So, if this approach were adopted, several
> > changes will be needed to all local rc scripts:
> > 	- any with a .sh suffix will need to be renamed from
> > 	  "foo.sh" to "foo"
> > 	- any files like "*.sh.sample" will have to be moved
> > 	  elsewhere, or made non-executable
> > 	- rcorder tags will need to be added to any that care
> > 	  about the order of their execution, and names like
> > 	  "000.*" can be eliminated
> 
> There is very little chance of getting this to fly.  Remember, any
> solution has to work for all releases currently supported by ports.  In
> practice, this currently means the security branches so anything that
> breaks existing localpkg based systems is not going to work.  I think
> that keeping the .sh extension is going to be required for the
> foreseeable future.  Requiring that rcorder runs on all the .sh files
> generate an appropriate order is probably a reasonable goal for 6.0.
> If we did that in 6.0, we could require the removal of non .sh files for
> 7.0 and remove the .sh extensions through a release dependent action in
> the RC_SUBR support in bsd.port.mk.  In theory you could do the RC_SUBR
> changes for 6.0, but big changes to requirements for ports are very time
> consuming, especially if you are going to modify bsd.port.mk.
> 
> Any change of this order is going to require discussion on ports, and
> buy-in from portmgr.
> 

Is this as bad as you're suggesting?

Agreed, requiring "foo.sh" be renamed to "foo" for so many ports
is a biggie, so perhaps we keep the *.sh for now, and arrange that
files in the local scripts dirs are run in a subshell from rc.subr,
rather than being sourced.  This is probably important for security
reasons, anyway.  It also keeps existing semantics, so should work
on all systems.

It also eliminates the issue with foo.sh.sample as such files
will continue to be ignored.

We only need to add rcorder tags on ports which currently use
"NNN.foo.sh" scripts, and we could even delay this by introducing
an extra rc.conf flag to have /etc/rc execute any local NNN files
immediately after SERVERS or such suitable point.

If you feel this is not the desired direction, let's revert back
to the "localpkg hack".  My goal here was to simply introduce the
use of rcorder for local scripts so that those scripts which do
have tags can take advantage of them and thereby fix a problem
in which some things currently don't start.

	-jr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 390 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-rc/attachments/20050607/b179cb6d/attachment.bin


More information about the freebsd-rc mailing list