From owner-freebsd-current@FreeBSD.ORG Tue Mar 15 19:58:14 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 17D7D16A4CE for ; Tue, 15 Mar 2005 19:58:14 +0000 (GMT) Received: from 62-15-215-140.inversas.jazztel.es (62-15-215-140.inversas.jazztel.es [62.15.215.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id B0C1243D48 for ; Tue, 15 Mar 2005 19:58:12 +0000 (GMT) (envelope-from josemi@freebsd.jazztel.es) Received: from redesjm.local (orion.redesjm.local [192.168.254.16]) j2FJw4c9010389; Tue, 15 Mar 2005 20:58:04 +0100 (CET) (envelope-from freebsd@redesjm.local) Received: from localhost (localhost [[UNIX: localhost]]) by redesjm.local (8.13.3/8.13.3/Submit) id j2FJwGBJ000761; Tue, 15 Mar 2005 20:58:16 +0100 (CET) (envelope-from freebsd@redesjm.local) From: Jose M Rodriguez To: freebsd-current@freebsd.org Date: Tue, 15 Mar 2005 20:58:15 +0100 User-Agent: KMail/1.7.2 References: <200503142306.54642.freebsd@redesjm.local> <20050315062548.GA42826@gothmog.gr> In-Reply-To: <20050315062548.GA42826@gothmog.gr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200503152058.16299.freebsd@redesjm.local> X-AntiVirus: checked by AntiVir Milter (version: 1.1.0-3; AVE: 6.29.0.8; VDF: 6.29.0.100; host: antares.redesjm.local) cc: Giorgos Keramidas cc: Jose M Rodriguez Subject: Re: rcNG changes/aditions X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Mar 2005 19:58:14 -0000 El Martes, 15 de Marzo de 2005 07:25, Giorgos Keramidas escribi=F3: > On 2005-03-14 23:06, Jose M Rodriguez =20 wrote: > > update to PR conf/75137 (sound modules): I rework this adding > > support for preloaded modules to /etc/rc.subr > > > > +# > > # run_rc_command argument > > [...] > > > + # try to load ${name}_modules > > + # > > + eval "_modules=3D\$${name}_modules" > > + if [ -n "${_modules}" ]; then > > + debug "run_rc_command: kldload ${_modules}." > > + eval "preload_modules ${_modules}" > > + _return=3D$? > > + [ $_return -ne 0 ] && [ -z "$rc_force" ] && > > + return 1 > > + fi > > What happens if some of the modules are already loaded and rc_force > is not set? It looks like this may cause run_rc_command() to fail, > even though the modules are loaded and a subsequent run of the rc > command would succeed if attempted. > preload_modules test if the module is loaded before trying to load. It=20 only load what is not loaded before. I'm not sure if the logic is 100%=20 safe, but I tested this case. > - Giorgos > =2D- josemi