rcNG changes/aditions
Jose M Rodriguez
josemi at freebsd.jazztel.es
Tue Mar 15 11:58:14 PST 2005
El Martes, 15 de Marzo de 2005 07:25, Giorgos Keramidas escribió:
> On 2005-03-14 23:06, Jose M Rodriguez <josemi at freebsd.jazztel.es>
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=\$${name}_modules"
> > + if [ -n "${_modules}" ]; then
> > + debug "run_rc_command: kldload ${_modules}."
> > + eval "preload_modules ${_modules}"
> > + _return=$?
> > + [ $_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
only load what is not loaded before. I'm not sure if the logic is 100%
safe, but I tested this case.
> - Giorgos
>
--
josemi
More information about the freebsd-current
mailing list