2015-03-21 22:10:43 +03:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2015-04-06 18:07:50 +03:00
|
|
|
# $NetBSD: modules,v 1.2 2015/04/06 15:07:50 mlelstv Exp $
|
2015-03-21 22:10:43 +03:00
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: modules
|
2015-04-06 18:07:50 +03:00
|
|
|
# REQUIRE: fsck_root
|
|
|
|
# BEFORE: root
|
2015-03-21 22:10:43 +03:00
|
|
|
|
|
|
|
$_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."
|
2015-04-06 18:07:50 +03:00
|
|
|
while read name args; do
|
|
|
|
case $name in
|
|
|
|
''|"#"*)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
(
|
|
|
|
set -o noglob
|
|
|
|
eval set -- $args
|
|
|
|
modload "$@" "$name"
|
|
|
|
)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done < /etc/modules.conf
|
2015-03-21 22:10:43 +03:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|