Generalising ${required_*}
Yar Tikhiy
yar at comp.chem.msu.su
Tue Jul 25 21:05:36 UTC 2006
On Sat, Jul 22, 2006 at 11:03:38AM -0700, Doug Barton wrote:
> Yar Tikhiy wrote:
> > Hi all,
> >
> > As of now, the ${required_*} variables work only in rc.d scripts
> > using the default start method. I've found that making ${required_*}
> > work in scripts that override the default start method can help us
> > to reduce code duplication in /etc/rc.d. In particular, I'd like
> > to introduce ${required_modules} because quite a few scripts have
> > to have a prestart method just to load a kernel module.
> >
> > Do you think such change would make sense? Thanks.
> >
> > Its prototype can be found in my P4 tree:
> > //depot/user/yar/hack/etc/...
> > (also available via www at http://perforce.freebsd.org)
>
> For those of us who are p4 impaired, can you give us a URL to view the
> changes you're proposing?
Thank you for requesting this! It encouraged me to test my changes
at last and prepare a good old patch :-)
http://people.freebsd.org/~yar/required_modules.patch
Its top part converts quite a few rc.d scripts to using $required_modules
if possible or load_kld() otherwise in place of raw kldload. The
respective changes to rc.subr and rc.subr.8 appear at the bottom
of the patch.
--
Yar
More information about the freebsd-rc
mailing list