diff options
| author | ad <ad@NetBSD.org> | 2008-11-12 12:35:50 +0000 |
|---|---|---|
| committer | ad <ad@NetBSD.org> | 2008-11-12 12:35:50 +0000 |
| commit | 0efea177e37295fed654875d875160c47500d6bd (patch) | |
| tree | 9d0589344a5d07b9a511a2e81ebbd701744d03b5 /etc | |
| parent | 0f81d3e0a26c2833cd085c472a4a77c325486b75 (diff) | |
Remove LKMs and switch to the module framework, pass 1.
Proposed on tech-kern@.
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/MAKEDEV.tmpl | 9 | ||||
| -rw-r--r-- | etc/Makefile | 6 | ||||
| -rw-r--r-- | etc/defaults/rc.conf | 5 | ||||
| -rw-r--r-- | etc/lkm.conf | 6 | ||||
| -rw-r--r-- | etc/mtree/NetBSD.dist | 3 | ||||
| -rw-r--r-- | etc/mtree/special | 7 | ||||
| -rwxr-xr-x | etc/rc.d/Makefile | 4 | ||||
| -rwxr-xr-x | etc/rc.d/hostapd | 4 | ||||
| -rwxr-xr-x | etc/rc.d/ipfilter | 4 | ||||
| -rwxr-xr-x | etc/rc.d/ipsec | 6 | ||||
| -rwxr-xr-x | etc/rc.d/iscsi_target | 4 | ||||
| -rwxr-xr-x | etc/rc.d/lkm1 | 41 | ||||
| -rwxr-xr-x | etc/rc.d/lkm2 | 39 | ||||
| -rwxr-xr-x | etc/rc.d/lkm3 | 30 | ||||
| -rwxr-xr-x | etc/rc.d/mountall | 3 | ||||
| -rwxr-xr-x | etc/rc.d/mountd | 4 | ||||
| -rw-r--r-- | etc/rc.d/pf | 4 | ||||
| -rwxr-xr-x | etc/rc.d/pf_boot | 4 | ||||
| -rwxr-xr-x | etc/rc.d/securelevel | 4 | ||||
| -rw-r--r-- | etc/rc.lkm | 106 |
20 files changed, 27 insertions, 266 deletions
diff --git a/etc/MAKEDEV.tmpl b/etc/MAKEDEV.tmpl index 985dc656595..5ad07d0b979 100644 --- a/etc/MAKEDEV.tmpl +++ b/etc/MAKEDEV.tmpl @@ -1,5 +1,5 @@ #!/bin/sh - -# $NetBSD: MAKEDEV.tmpl,v 1.113 2008/09/14 13:59:54 jmcneill Exp $ +# $NetBSD: MAKEDEV.tmpl,v 1.114 2008/11/12 12:35:52 ad Exp $ # # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -246,7 +246,6 @@ # ite* terminal emulator interface to HP300 graphics devices # joy* joystick device # kttcp kernel ttcp helper device -# lkm loadable kernel modules interface # lockstat kernel locking statistics # magma* Magma multiport serial/parallel cards # midi* MIDI @@ -708,7 +707,7 @@ all) makedev bpf makedev tun0 tun1 tun2 tun3 makedev ipl pf crypto random - makedev lkm lockstat clockctl cpuctl + makedev lockstat clockctl cpuctl makedev atabus0 atabus1 atabus2 atabus3 makedev tap tap0 tap1 tap2 tap3 makedev gpio gpio0 gpio1 gpio2 gpio3 gpio4 gpio5 gpio6 gpio7 @@ -1249,10 +1248,6 @@ speaker) mkdev speaker c %spkr_chr% 0 ;; -lkm) - mkdev lkm c %lkm_chr% 0 640 $g_kmem - ;; - lockstat) mkdev lockstat c %lockstat_chr% 0 ;; diff --git a/etc/Makefile b/etc/Makefile index 20409f30da6..a833d3cb764 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.360 2008/11/09 23:02:28 mrg Exp $ +# $NetBSD: Makefile,v 1.361 2008/11/12 12:35:52 ad Exp $ # from: @(#)Makefile 8.7 (Berkeley) 5/25/95 # Environment variables without default values: @@ -90,11 +90,11 @@ BINGRP= wheel UTMPGRP= utmp BIN1+= audit-packages.conf bootptab changelist csh.cshrc csh.login \ csh.logout daily daily.conf dm.conf envsys.conf floppytab ftpchroot \ - ftpusers gettytab group hosts hosts.lpd inetd.conf lkm.conf \ + ftpusers gettytab group hosts hosts.lpd inetd.conf \ locate.conf login.conf mailer.conf man.conf monthly monthly.conf \ mrouted.conf named.conf netconfig networks newsyslog.conf \ nsswitch.conf ntp.conf passwd.conf phones printcap profile protocols \ - rbootd.conf rc rc.conf rc.lkm rc.local rc.subr rc.shutdown remote rpc \ + rbootd.conf rc rc.conf rc.local rc.subr rc.shutdown remote rpc \ security security.conf services shells shrc sysctl.conf syslog.conf \ weekly weekly.conf wscons.conf diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 77d3e2259db..682c334ffa4 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -1,4 +1,4 @@ -# $NetBSD: rc.conf,v 1.95 2008/07/27 19:31:03 joerg Exp $ +# $NetBSD: rc.conf,v 1.96 2008/11/12 12:35:52 ad Exp $ # # /etc/defaults/rc.conf -- # default configuration of /etc/rc.conf @@ -98,9 +98,6 @@ cgd=YES # One-time actions and programs on boot-up. # -lkm=NO # Run /etc/rc.lkm. /usr needs to be part of /, or - # part of critical_filesystems_local. - savecore=YES savecore_flags="-z" savecore_dir="/var/crash" per_user_tmp=NO # per-user /tmp directories diff --git a/etc/lkm.conf b/etc/lkm.conf deleted file mode 100644 index 5bfddcab402..00000000000 --- a/etc/lkm.conf +++ /dev/null @@ -1,6 +0,0 @@ -# $NetBSD: lkm.conf,v 1.2 1997/07/14 11:55:46 drochner Exp $ -# -# see lkm.conf(5) for details. path will look in /lkm and /usr/lkm. -# -# path options entry postinstall output when -#/lkm/if_ipl.o - - - - - diff --git a/etc/mtree/NetBSD.dist b/etc/mtree/NetBSD.dist index e7e700218ec..bddbb1e88fd 100644 --- a/etc/mtree/NetBSD.dist +++ b/etc/mtree/NetBSD.dist @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist,v 1.385 2008/10/30 21:45:55 christos Exp $ +# $NetBSD: NetBSD.dist,v 1.386 2008/11/12 12:35:52 ad Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -557,7 +557,6 @@ ./usr/libexec/ching ./usr/libexec/lpr ./usr/libexec/postfix -./usr/lkm ./usr/mdec ./usr/pkg ignore optional ./usr/sbin diff --git a/etc/mtree/special b/etc/mtree/special index 630f7064563..895bc4ad7cd 100644 --- a/etc/mtree/special +++ b/etc/mtree/special @@ -1,4 +1,4 @@ -# $NetBSD: special,v 1.121 2008/06/20 17:05:26 peter Exp $ +# $NetBSD: special,v 1.122 2008/11/12 12:35:52 ad Exp $ # @(#)special 8.2 (Berkeley) 1/23/94 # # This file may be overwritten on upgrades. @@ -92,7 +92,6 @@ ./etc/iscsi/auths type=file mode=0600 ./etc/iscsi/targets type=file mode=0644 ./etc/ld.so.conf type=file mode=0644 optional -./etc/lkm.conf type=file mode=0644 optional ./etc/localtime type=link mode=0755 ./etc/locate.conf type=file mode=0644 optional ./etc/login.conf type=file mode=0644 optional @@ -219,9 +218,6 @@ ./etc/rc.d/isdnd type=file mode=0555 ./etc/rc.d/kdc type=file mode=0555 ./etc/rc.d/ldconfig type=file mode=0555 -./etc/rc.d/lkm1 type=file mode=0555 -./etc/rc.d/lkm2 type=file mode=0555 -./etc/rc.d/lkm3 type=file mode=0555 ./etc/rc.d/local type=file mode=0555 ./etc/rc.d/lpd type=file mode=0555 ./etc/rc.d/mixerctl type=file mode=0555 @@ -289,7 +285,6 @@ ./etc/rc.d/ypbind type=file mode=0555 ./etc/rc.d/yppasswdd type=file mode=0555 ./etc/rc.d/ypserv type=file mode=0555 -./etc/rc.lkm type=file mode=0644 ./etc/rc.local type=file mode=0644 optional ./etc/rc.shutdown type=file mode=0644 ./etc/rc.shutdown.local type=file mode=0644 optional diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index c4768f8e24c..6025f9332f2 100755 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.68 2008/06/18 09:06:26 yamt Exp $ +# $NetBSD: Makefile,v 1.69 2008/11/12 12:35:52 ad Exp $ .include <bsd.own.mk> @@ -18,7 +18,7 @@ CONFIGFILES=\ identd ifwatchd inetd ipfilter ipfs ipmon ipnat ipsec \ irdaattach iscsi_target isdnd \ kdc \ - ldconfig lkm1 lkm2 lkm3 local lpd \ + ldconfig local lpd \ mixerctl mopd motd mountall mountcritlocal mountcritremote \ mountd moused mrouted \ named ndbootd network newsyslog nfsd nfslocking ntpd ntpdate \ diff --git a/etc/rc.d/hostapd b/etc/rc.d/hostapd index c78a234241e..d5bdb69d146 100755 --- a/etc/rc.d/hostapd +++ b/etc/rc.d/hostapd @@ -1,10 +1,10 @@ #!/bin/sh # -# $NetBSD: hostapd,v 1.3 2006/06/02 01:06:16 rpaulo Exp $ +# $NetBSD: hostapd,v 1.4 2008/11/12 12:35:52 ad Exp $ # # PROVIDE: hostapd -# REQUIRE: mountcritremote beforemountlkm +# REQUIRE: mountcritremote $_rc_subr_loaded . /etc/rc.subr diff --git a/etc/rc.d/ipfilter b/etc/rc.d/ipfilter index 7194ecd9158..4fc208c57e0 100755 --- a/etc/rc.d/ipfilter +++ b/etc/rc.d/ipfilter @@ -1,10 +1,10 @@ #!/bin/sh # -# $NetBSD: ipfilter,v 1.15 2007/04/06 14:20:17 apb Exp $ +# $NetBSD: ipfilter,v 1.16 2008/11/12 12:35:52 ad Exp $ # # PROVIDE: ipfilter -# REQUIRE: root beforenetlkm mountcritlocal tty +# REQUIRE: root mountcritlocal tty $_rc_subr_loaded . /etc/rc.subr diff --git a/etc/rc.d/ipsec b/etc/rc.d/ipsec index e6406a7f1e1..0b357810630 100755 --- a/etc/rc.d/ipsec +++ b/etc/rc.d/ipsec @@ -1,14 +1,12 @@ #!/bin/sh # -# $NetBSD: ipsec,v 1.9 2007/04/06 14:20:17 apb Exp $ +# $NetBSD: ipsec,v 1.10 2008/11/12 12:35:52 ad Exp $ # # PROVIDE: ipsec -# REQUIRE: root beforenetlkm mountcritlocal tty +# REQUIRE: root mountcritlocal tty # BEFORE: DAEMON -# it does not really require beforenetlkm. - $_rc_subr_loaded . /etc/rc.subr name="ipsec" diff --git a/etc/rc.d/iscsi_target b/etc/rc.d/iscsi_target index ca47e5e28ad..3aff046464f 100755 --- a/etc/rc.d/iscsi_target +++ b/etc/rc.d/iscsi_target @@ -1,10 +1,10 @@ #!/bin/sh # -# $NetBSD: iscsi_target,v 1.1 2006/02/08 19:02:59 agc Exp $ +# $NetBSD: iscsi_target,v 1.2 2008/11/12 12:35:52 ad Exp $ # # PROVIDE: iscsi_target -# REQUIRE: NETWORKING mountall beforemountlkm quota +# REQUIRE: NETWORKING mountall quota $_rc_subr_loaded . /etc/rc.subr diff --git a/etc/rc.d/lkm1 b/etc/rc.d/lkm1 deleted file mode 100755 index 07ce8117fcf..00000000000 --- a/etc/rc.d/lkm1 +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# -# $NetBSD: lkm1,v 1.8 2004/08/13 18:08:03 mycroft Exp $ -# - -# PROVIDE: beforenetlkm -# REQUIRE: root bootconf - -$_rc_subr_loaded . /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" diff --git a/etc/rc.d/lkm2 b/etc/rc.d/lkm2 deleted file mode 100755 index c42db7f7bf7..00000000000 --- a/etc/rc.d/lkm2 +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# -# $NetBSD: lkm2,v 1.6 2004/08/13 18:08:03 mycroft Exp $ -# - -# PROVIDE: beforemountlkm -# REQUIRE: syslogd - -$_rc_subr_loaded . /etc/rc.subr - -name="lkm2" -rcvar="lkm" -start_cmd="lkm2_start" -stop_cmd="lkm2_stop" - -# load kernel modules specified in /etc/lkm.conf -# -lkm2_start() -{ - if [ -r /etc/rc.lkm ]; then - lkmstage=BEFOREMOUNT - set start ; . /etc/rc.lkm - else - warn "/etc/rc.lkm not found; LKMs not loaded." - fi - - /etc/rc.d/sysdb devdb -} - -lkm2_stop() -{ - if [ -r /etc/rc.lkm ]; then - lkmstage=BEFOREMOUNT - set stop ; . /etc/rc.lkm - fi -} - -load_rc_config lkm -run_rc_command "$1" diff --git a/etc/rc.d/lkm3 b/etc/rc.d/lkm3 deleted file mode 100755 index d8b21d53104..00000000000 --- a/etc/rc.d/lkm3 +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# -# $NetBSD: lkm3,v 1.8 2004/08/13 18:08:03 mycroft Exp $ -# - -# PROVIDE: aftermountlkm -# REQUIRE: mountall -# BEFORE: DAEMON - -$_rc_subr_loaded . /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" diff --git a/etc/rc.d/mountall b/etc/rc.d/mountall index 44375630d93..209ee62cfc9 100755 --- a/etc/rc.d/mountall +++ b/etc/rc.d/mountall @@ -1,10 +1,9 @@ #!/bin/sh # -# $NetBSD: mountall,v 1.4 2004/08/13 18:08:03 mycroft Exp $ +# $NetBSD: mountall,v 1.5 2008/11/12 12:35:52 ad Exp $ # # PROVIDE: mountall -# REQUIRE: beforemountlkm $_rc_subr_loaded . /etc/rc.subr diff --git a/etc/rc.d/mountd b/etc/rc.d/mountd index b40cbb89afd..05d27e10744 100755 --- a/etc/rc.d/mountd +++ b/etc/rc.d/mountd @@ -1,10 +1,10 @@ #!/bin/sh # -# $NetBSD: mountd,v 1.12 2004/08/13 18:08:03 mycroft Exp $ +# $NetBSD: mountd,v 1.13 2008/11/12 12:35:52 ad Exp $ # # PROVIDE: mountd -# REQUIRE: NETWORKING mountall beforemountlkm rpcbind quota +# REQUIRE: NETWORKING mountall rpcbind quota $_rc_subr_loaded . /etc/rc.subr diff --git a/etc/rc.d/pf b/etc/rc.d/pf index 87382dd8f4e..70d8cd44631 100644 --- a/etc/rc.d/pf +++ b/etc/rc.d/pf @@ -1,10 +1,10 @@ #!/bin/sh # -# $NetBSD: pf,v 1.7 2007/04/06 14:20:18 apb Exp $ +# $NetBSD: pf,v 1.8 2008/11/12 12:35:52 ad Exp $ # # PROVIDE: pf -# REQUIRE: root beforenetlkm mountcritlocal tty network dhclient +# REQUIRE: root mountcritlocal tty network dhclient # BEFORE: NETWORKING $_rc_subr_loaded . /etc/rc.subr diff --git a/etc/rc.d/pf_boot b/etc/rc.d/pf_boot index c22ae690dbb..bc1a58ea94d 100755 --- a/etc/rc.d/pf_boot +++ b/etc/rc.d/pf_boot @@ -1,10 +1,10 @@ #!/bin/sh # -# $NetBSD: pf_boot,v 1.2 2007/04/06 14:20:19 apb Exp $ +# $NetBSD: pf_boot,v 1.3 2008/11/12 12:35:52 ad Exp $ # # PROVIDE: pf_boot -# REQUIRE: root beforenetlkm mountcritlocal tty +# REQUIRE: root mountcritlocal tty # BEFORE: network $_rc_subr_loaded . /etc/rc.subr diff --git a/etc/rc.d/securelevel b/etc/rc.d/securelevel index 0e1c8a606c5..84288640dd5 100755 --- a/etc/rc.d/securelevel +++ b/etc/rc.d/securelevel @@ -1,10 +1,10 @@ #!/bin/sh # -# $NetBSD: securelevel,v 1.6 2004/10/11 15:00:51 christos Exp $ +# $NetBSD: securelevel,v 1.7 2008/11/12 12:35:52 ad Exp $ # # PROVIDE: securelevel -# REQUIRE: aftermountlkm ipnat mountd +# REQUIRE: ipnat mountd # BEFORE: DAEMON $_rc_subr_loaded . /etc/rc.subr diff --git a/etc/rc.lkm b/etc/rc.lkm deleted file mode 100644 index 6c54fa0d49d..00000000000 --- a/etc/rc.lkm +++ /dev/null @@ -1,106 +0,0 @@ -# $NetBSD: rc.lkm,v 1.9 2005/03/04 21:11:23 cube Exp $ -# -# this script loads or unloads LKMs (loadable kernel modules). - -if [ -s /etc/lkm.conf ]; then - case "$1" in - start) - (while read path options entry postinstall output when; do - flags='' - - case $path in - \#*|"") - continue - ;; - /*) - ;; - *) - if [ -f "/lkm/$path" ]; then - path="/lkm/$path" - elif [ -f "/usr/lkm/$path" ]; then - path="/usr/lkm/$path" - else - echo "couldn't find module $path" - fi - ;; - esac - - case $options in - -) - ;; - *) - flags="$flags $options" - ;; - esac - - case $entry in - -) - ;; - *) - flags="$flags -e $entry" - ;; - esac - - case $postinstall in - -) - ;; - *) - flags="$flags -p $postinstall" - ;; - esac - - case $output in - -) - ;; - *) - if [ "$output" = TEMP ]; then - flags="$flags -o /tmp/lkm.$$" - else - flags="$flags -o $output" - fi - ;; - esac - - case $when in - -) - when=BEFORENET - ;; - [A-Z]*) - ;; - *) - echo "invalid \"when\" field \`${when}' in /etc/lkm.conf - $path not loaded!" - continue - ;; - esac - - if [ "$when" != "$lkmstage" ]; then - continue - fi - - echo -n "${path##*/}: " - modload $flags $path - rm -f /tmp/lkm.$$ - done) < /etc/lkm.conf - ;; - stop) - (while read path options entry postinstall output when; do - case $path in - \#*|"") - continue - ;; - /*) - name=${path##*/} - name=${name%.o} - ;; - *) - name=${path%.o} - ;; - esac - - if [ "$when" = "$lkmstage" ]; then - modunload -n ${name} - fi - done) < /etc/lkm.conf - ;; - esac -fi |
