NetBSD/etc/rc.d/lkm1
atatat a67080c774 Reorganize the sysdb script so that lkm{1,2,3} can request that the
dev database be rebuilt after loading modules.  Loading modules might
create new nodes in /dev, but the dev database is being initialized
too soon for lkm2 and lkm3.  This means that, eg, /dev/xf86 (typically
marked AFTERMOUNT and loaded by lkm2) will show up properly.  Reviewed
by lukem.
2002-10-08 16:21:52 +00:00

42 lines
682 B
Bash
Executable File

#!/bin/sh
#
# $NetBSD: lkm1,v 1.7 2002/10/08 16:21:52 atatat Exp $
#
# PROVIDE: beforenetlkm
# REQUIRE: root bootconf
. /etc/rc.subr
name="lkm1"
rcvar="lkm"
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 [ -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
/etc/rc.d/sysdb devdb
}
lkm1_stop()
{
if [ -f /etc/rc.lkm ] && [ -x /usr/bin/ld ]; then
lkmstage=BEFORENET
set stop ; . /etc/rc.lkm
fi
}
load_rc_config lkm
run_rc_command "$1"