NetBSD/etc/rc.d/lkm1
lukem 5c1b0ec207 Use load_rc_config() (from rc.subr) instead of sourcing /etc/rc.conf.
This allows us or a user to change the configuration file method in
one place - rc.subr - without having to edit all of the rc.d/* files.
2000-05-13 08:45:06 +00:00

39 lines
670 B
Bash
Executable File

#!/bin/sh
#
# $NetBSD: lkm1,v 1.2 2000/05/13 08:45:07 lukem Exp $
#
# PROVIDE: beforenetlkm
# REQUIRE: root
. /etc/rc.subr
name="lkm1"
start_cmd="lkm1_start"
stop_cmd="lkm1_stop"
lkm1_start()
{
# load kernel modules specified in /etc/lkm.conf if the /usr
# filesystem is already present with "/" or can be mounted now
#
if checkyesno lkm && [ -f /etc/rc.lkm ]; then
mount /usr >/dev/null 2>&1
if [ -x /usr/bin/ld ]; then
lkmstage=BEFORENET
set start ; . /etc/rc.lkm
fi
fi
}
lkm1_stop()
{
if checkyesno lkm && [ -f /etc/rc.lkm -a -x /usr/bin/ld ]; then
lkmstage=BEFORENET
set stop ; . /etc/rc.lkm
fi
}
load_rc_config $name
run_rc_command "$1"