NetBSD/etc/rc.d/lkm3
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

31 lines
440 B
Bash
Executable File

#!/bin/sh
#
# $NetBSD: lkm3,v 1.7 2002/10/08 16:21:52 atatat Exp $
#
# PROVIDE: aftermountlkm
# REQUIRE: mountall
# BEFORE: DAEMON
. /etc/rc.subr
name="lkm3"
rcvar="lkm"
start_cmd="do_lkm3 start"
stop_cmd="do_lkm3 stop"
do_lkm3()
{
# (un)load kernel modules specified in /etc/lkm.conf
#
if [ -f /etc/rc.lkm ]; then
lkmstage=AFTERMOUNT
set $1 ; . /etc/rc.lkm
fi
/etc/rc.d/sysdb devdb
}
load_rc_config lkm
run_rc_command "$1"