From owner-cvs-all@FreeBSD.ORG Wed Jun 21 10:53:04 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F7BB16A474; Wed, 21 Jun 2006 10:53:04 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 084DD43D49; Wed, 21 Jun 2006 10:53:01 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.3) with ESMTP id k5LAqsHv048668; Wed, 21 Jun 2006 14:52:54 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.3/Submit) id k5LAqsub048667; Wed, 21 Jun 2006 14:52:54 +0400 (MSD) (envelope-from yar) Date: Wed, 21 Jun 2006 14:52:53 +0400 From: Yar Tikhiy To: Florent Thoumie Message-ID: <20060621105253.GE45947@comp.chem.msu.su> References: <200606210942.k5L9gtAi060504@repoman.freebsd.org> <1150883785.3467.4.camel@mayday.esat.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1150883785.3467.4.camel@mayday.esat.net> User-Agent: Mutt/1.5.9i 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 X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2006 10:53:04 -0000 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 > > > > 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. rc.d/geli doesn't use kldload directlty, so it certainly won't benefit from the function I introduced. > 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. 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. -- Yar