]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - etc/rc.d/lkm1
When stopping a chrooted named, unmount the devfs filesystem from
[FreeBSD/FreeBSD.git] / etc / rc.d / lkm1
1 #!/bin/sh
2 #
3 # $NetBSD: lkm1,v 1.6 2000/10/09 06:11:38 nisimura Exp $
4 # $FreeBSD$
5 #
6
7 # PROVIDE: beforenetlkm
8 # REQUIRE: root bootconf
9
10 . /etc/rc.subr
11
12 name="lkm1"
13 rcvar="lkm"
14 start_cmd="lkm1_start"
15 stop_cmd="lkm1_stop"
16
17 lkm1_start()
18 {
19 #               load kernel modules specified in /etc/lkm.conf if the /usr
20 #               filesystem is already present with "/" or can be mounted now
21 #
22         if [ -f /etc/rc.lkm ]; then
23                 mount /usr >/dev/null 2>&1
24                 if [ -x /usr/bin/ld ]; then
25                         lkmstage=BEFORENET
26                         set start ; . /etc/rc.lkm
27                 fi
28         fi
29 }
30
31 lkm1_stop()
32 {
33         if [ -f /etc/rc.lkm ] && [ -x /usr/bin/ld ]; then
34                 lkmstage=BEFORENET
35                 set stop ; . /etc/rc.lkm
36         fi
37 }
38
39 load_rc_config lkm
40 run_rc_command "$1"