cvs commit: src/etc rc.subr src/share/man/man8 rc.subr.8

Florent Thoumie flz at FreeBSD.org
Wed Jun 21 09:56:36 UTC 2006


On Wed, 2006-06-21 at 09:42 +0000, Yar Tikhiy wrote:
> yar         2006-06-21 09:42:55 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     etc                  rc.subr 
>     share/man/man8       rc.subr.8 
>   Log:
>   Quite a number of rc.d scripts try to load kernel modules.  Many
>   of them do that conditionally depending on kldstat.  The code is
>   duplicated all over, but bugs can be uniqie.
>   
>   To make the things more consistent, introduce a new rc.subr function,
>   load_kld, which takes care of loading a kernel module conditionally.
>   
>   (Found this lying for a while in my p4 branch for various hacks.)

I added such a function some weeks ago (far more simple though). Talking
with pjd, I've backed it out to use the somewhat straight-forward method
he used in rc.d/geli.

I don't have a particular feeling against your function but it uses
commands that may not be available early enough (getopt, egrep). While
it's easy to remove the getopt dependency (see rc.d/mdconfig), it's not
the case for egrep.

-- 
Florent Thoumie
flz at FreeBSD.org
FreeBSD Committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20060621/2286be07/attachment.pgp


More information about the cvs-src mailing list