39 lines
548 B
Bash
Executable File
39 lines
548 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $NetBSD: modules,v 1.2 2015/04/06 15:07:50 mlelstv Exp $
|
|
#
|
|
|
|
# PROVIDE: modules
|
|
# REQUIRE: fsck_root
|
|
# BEFORE: root
|
|
|
|
$_rc_subr_loaded . /etc/rc.subr
|
|
|
|
name="modules"
|
|
rcvar=$name
|
|
start_cmd="modules_start"
|
|
stop_cmd=":"
|
|
|
|
modules_start()
|
|
{
|
|
if [ -f /etc/modules.conf ]; then
|
|
echo "Loading modules."
|
|
while read name args; do
|
|
case $name in
|
|
''|"#"*)
|
|
;;
|
|
*)
|
|
(
|
|
set -o noglob
|
|
eval set -- $args
|
|
modload "$@" "$name"
|
|
)
|
|
;;
|
|
esac
|
|
done < /etc/modules.conf
|
|
fi
|
|
}
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|