From ad10a899ae4f7b7697616cc6c8e7c20b5e771653 Mon Sep 17 00:00:00 2001 From: yar Date: Wed, 21 Jun 2006 09:42:55 +0000 Subject: 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.) --- share/man/man8/rc.subr.8 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'share/man/man8') diff --git a/share/man/man8/rc.subr.8 b/share/man/man8/rc.subr.8 index e9a3d08..4343345 100644 --- a/share/man/man8/rc.subr.8 +++ b/share/man/man8/rc.subr.8 @@ -64,6 +64,8 @@ .It .Ic info Ar message .It +.Ic load_kld Oo Fl e Ar regex Oc Oo Fl m Ar module Oc Ar file +.It .Ic load_rc_config Ar name .It .Ic load_rc_config_var Ar name Ar var @@ -312,6 +314,20 @@ turned on or off by the .Xr rc.conf 5 variable .Va rc_info . +.It Ic load_kld Oo Fl e Ar regex Oc Oo Fl m Ar module Oc Ar file +Load +.Ar file +as a kernel module unless it is already loaded. +For the purpose of checking the module status, +either the exact module name can be specified using +.Fl m , +or an +.Xr egrep 1 +regular expression matching the module name can be supplied via +.Fl e . +By default, the module is assumed to have the same name as +.Ar file , +which is not always the case. .It Ic load_rc_config Ar name Source in the configuration files for .Ar name . -- cgit v1.1