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

Brooks Davis brooks at one-eyed-alien.net
Tue Jun 7 17:37:42 GMT 2005


On Tue, Jun 07, 2005 at 12:08:55PM -0400, J.R. Oldroyd wrote:
> Having slept on this, I am in two minds as to which approach is
> better: hacking localpkg or fixing /etc/rc to handle everything
> in all startup dirs.
> 
> I do think that the use of a single rc script to run all rc files
> is probably the proper approach, even though moving to this from
> where we are now will require more changes.
> 
> So, I offer the following solution as an alternative to the hack
> to localpkg.  Below I:
> 	- add /etc/rc.d/MOUNTDONE
> 		a dummy script to flag the point in the list
> 		when we've completed the fs mounts
> 	- patches to /etc/rc
> 		to run the files list in two passes, once
> 		for the files in /etc/rc.d up to the MOUNTDONE
> 		point, and then a second time with the files
> 		in the local startup dirs included, this time
> 		skipping files in /etc/rc.d prior to the
> 		MOUNTDONE point

This part looks like it's probably a feasible solution, though I'm not
fully convinced of its value relative to the complexity it adds.

> In this version, I have removed the code that required local startup
> scripts to be named *.sh since rc.subr's run_rc_script function
> handles *.sh specially.  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.

-- 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-rc/attachments/20050607/6938f6fd/attachment.bin


More information about the freebsd-rc mailing list