Date: Wed, 21 Jun 2006 12:05:09 +0100 From: Florent Thoumie <flz@FreeBSD.org> To: Yar Tikhiy <yar@comp.chem.msu.su> Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/etc rc.subr src/share/man/man8 rc.subr.8 Message-ID: <1150887909.3467.18.camel@mayday.esat.net> In-Reply-To: <20060621105253.GE45947@comp.chem.msu.su> References: <200606210942.k5L9gtAi060504@repoman.freebsd.org> <1150883785.3467.4.camel@mayday.esat.net> <20060621105253.GE45947@comp.chem.msu.su>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-mxS7X2YvcO32r7F9ko1A Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 2006-06-21 at 14:52 +0400, Yar Tikhiy wrote: > On Wed, Jun 21, 2006 at 10:56:25AM +0100, Florent Thoumie wrote: > > On Wed, 2006-06-21 at 09:42 +0000, Yar Tikhiy wrote: > > > yar 2006-06-21 09:42:55 UTC > > >=20 > > > FreeBSD src repository > > >=20 > > > Modified files: > > > etc rc.subr=20 > > > share/man/man8 rc.subr.8=20 > > > 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. > > > =20 > > > To make the things more consistent, introduce a new rc.subr functio= n, > > > load_kld, which takes care of loading a kernel module conditionally= . > > > =20 > > > (Found this lying for a while in my p4 branch for various hacks.) > >=20 > > I added such a function some weeks ago (far more simple though). Talkin= g > > with pjd, I've backed it out to use the somewhat straight-forward metho= d > > he used in rc.d/geli. >=20 > rc.d/geli doesn't use kldload directlty, so it certainly won't > benefit from the function I introduced. Then I'm not sure what script would benefit from this function. Can you point me to an example? > > 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. >=20 > It's POSIX getopts, which ought to be a shell built-it by its design. > egrep is used with -e only, one can avoid using it if egrep isn't > available yet. The only issue is true and false, I was sure they > were in /bin, but it can be fixed easily. Still, with /bin/sh, getopt isn't a builtin: $ sh -c 'which getopt' /usr/bin/getopt You won't gain anything using grep instead of egrep since they're both in /usr/bin. --=20 Florent Thoumie flz@FreeBSD.org FreeBSD Committer --=-mxS7X2YvcO32r7F9ko1A Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQBEmSflMxEkbVFH3PQRAkuoAJ403RQzPpaOMIyLlJ+/QQhcJwPHmgCeJ3J5 U6dwxdnbdVBW+UOaDsVGdlU= =RSdE -----END PGP SIGNATURE----- --=-mxS7X2YvcO32r7F9ko1A--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1150887909.3467.18.camel>