Module Name: src Committed By: jmcneill Date: Sat Mar 21 19:10:44 UTC 2015
Modified Files: src/distrib/sets/lists/etc: mi src/distrib/sets/lists/man: mi src/etc/defaults: rc.conf src/etc/mtree: special src/etc/rc.d: Makefile src/share/man/man5: Makefile src/usr.sbin/postinstall: postinstall Added Files: src/etc/rc.d: modules src/share/man/man5: modules.conf.5 Log Message: Process /etc/modules.conf (if present) at startup, before securelevel is raised, to allow module loading on ports without a module aware bootloader. To generate a diff of this commit: cvs rdiff -u -r1.235 -r1.236 src/distrib/sets/lists/etc/mi cvs rdiff -u -r1.1496 -r1.1497 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.131 -r1.132 src/etc/defaults/rc.conf cvs rdiff -u -r1.151 -r1.152 src/etc/mtree/special cvs rdiff -u -r1.91 -r1.92 src/etc/rc.d/Makefile cvs rdiff -u -r0 -r1.1 src/etc/rc.d/modules cvs rdiff -u -r1.70 -r1.71 src/share/man/man5/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man5/modules.conf.5 cvs rdiff -u -r1.189 -r1.190 src/usr.sbin/postinstall/postinstall Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/distrib/sets/lists/etc/mi diff -u src/distrib/sets/lists/etc/mi:1.235 src/distrib/sets/lists/etc/mi:1.236 --- src/distrib/sets/lists/etc/mi:1.235 Sat Feb 21 23:13:00 2015 +++ src/distrib/sets/lists/etc/mi Sat Mar 21 19:10:43 2015 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.235 2015/02/21 23:13:00 joerg Exp $ +# $NetBSD: mi,v 1.236 2015/03/21 19:10:43 jmcneill Exp $ # # Note: end-user configuration files that are moved to another location # should not be marked "obsolete"; they should just be removed from @@ -232,6 +232,7 @@ ./etc/rc.d/makemandb etc-man-rc ./etc/rc.d/mdnsd etc-mdns-rc ./etc/rc.d/mixerctl etc-audio-rc +./etc/rc.d/modules etc-sys-rc ./etc/rc.d/mopd etc-bootserver-rc ./etc/rc.d/motd etc-sys-rc ./etc/rc.d/mountall etc-sys-rc Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1496 src/distrib/sets/lists/man/mi:1.1497 --- src/distrib/sets/lists/man/mi:1.1496 Mon Mar 2 21:55:45 2015 +++ src/distrib/sets/lists/man/mi Sat Mar 21 19:10:43 2015 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1496 2015/03/02 21:55:45 christos Exp $ +# $NetBSD: mi,v 1.1497 2015/03/21 19:10:43 jmcneill Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -2114,6 +2114,7 @@ ./usr/share/man/cat5/master.passwd.0 man-sys-catman .cat ./usr/share/man/cat5/memcache_table.0 man-postfix-catman postfix,.cat ./usr/share/man/cat5/mixerctl.conf.0 man-audio-catman .cat +./usr/share/man/cat5/modules.conf.0 man-sys-catman .cat ./usr/share/man/cat5/moduli.0 man-secsh-catman crypto,.cat ./usr/share/man/cat5/monthly.0 man-sys-catman .cat ./usr/share/man/cat5/monthly.conf.0 man-sys-catman .cat @@ -5081,6 +5082,7 @@ ./usr/share/man/html5/master.passwd.html man-sys-htmlman html ./usr/share/man/html5/memcache_table.html man-postfix-htmlman postfix,html ./usr/share/man/html5/mixerctl.conf.html man-audio-htmlman html +./usr/share/man/html5/modules.conf.html man-sys-htmlman html ./usr/share/man/html5/moduli.html man-secsh-htmlman crypto,html ./usr/share/man/html5/monthly.conf.html man-sys-htmlman html ./usr/share/man/html5/monthly.html man-sys-htmlman html @@ -7998,6 +8000,7 @@ ./usr/share/man/man5/master.passwd.5 man-sys-man .man ./usr/share/man/man5/memcache_table.5 man-postfix-man postfix,.man ./usr/share/man/man5/mixerctl.conf.5 man-audio-man .man +./usr/share/man/man5/modules.conf.5 man-sys-man .man ./usr/share/man/man5/moduli.5 man-secsh-man crypto,.man ./usr/share/man/man5/monthly.5 man-sys-man .man ./usr/share/man/man5/monthly.conf.5 man-sys-man .man Index: src/etc/defaults/rc.conf diff -u src/etc/defaults/rc.conf:1.131 src/etc/defaults/rc.conf:1.132 --- src/etc/defaults/rc.conf:1.131 Sat Feb 21 23:13:00 2015 +++ src/etc/defaults/rc.conf Sat Mar 21 19:10:43 2015 @@ -1,4 +1,4 @@ -# $NetBSD: rc.conf,v 1.131 2015/02/21 23:13:00 joerg Exp $ +# $NetBSD: rc.conf,v 1.132 2015/03/21 19:10:43 jmcneill Exp $ # # /etc/defaults/rc.conf -- # default configuration of /etc/rc.conf @@ -132,6 +132,7 @@ ldconfig=YES # rebuild a.out ldconfi sysdb=YES # build system databases rndctl=NO rndctl_flags="" # configure rndctl(8) gpio=NO # configure GPIO devices +modules=YES # process /etc/modules.conf # cope with other OSes using the real time clock at localtime on this # machine (by adjusting kern.rtc_offset at boot) Index: src/etc/mtree/special diff -u src/etc/mtree/special:1.151 src/etc/mtree/special:1.152 --- src/etc/mtree/special:1.151 Sat Feb 21 23:13:00 2015 +++ src/etc/mtree/special Sat Mar 21 19:10:43 2015 @@ -1,4 +1,4 @@ -# $NetBSD: special,v 1.151 2015/02/21 23:13:00 joerg Exp $ +# $NetBSD: special,v 1.152 2015/03/21 19:10:43 jmcneill Exp $ # @(#)special 8.2 (Berkeley) 1/23/94 # # This file may be overwritten on upgrades. @@ -233,6 +233,7 @@ ./etc/rc.d/makemandb type=file mode=0555 ./etc/rc.d/mdnsd type=file mode=0555 ./etc/rc.d/mixerctl type=file mode=0555 +./etc/rc.d/modules type=file mode=0555 ./etc/rc.d/mopd type=file mode=0555 ./etc/rc.d/motd type=file mode=0555 ./etc/rc.d/mountall type=file mode=0555 Index: src/etc/rc.d/Makefile diff -u src/etc/rc.d/Makefile:1.91 src/etc/rc.d/Makefile:1.92 --- src/etc/rc.d/Makefile:1.91 Sat Feb 21 23:13:00 2015 +++ src/etc/rc.d/Makefile Sat Mar 21 19:10:43 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.91 2015/02/21 23:13:00 joerg Exp $ +# $NetBSD: Makefile,v 1.92 2015/03/21 19:10:43 jmcneill Exp $ .include <bsd.own.mk> @@ -26,8 +26,8 @@ CONFIGFILES=\ irdaattach iscsi_target iscsid isdnd isibootd \ kdc \ ldconfig ldpd local lpd lvm \ - makemandb mdnsd mixerctl mopd motd mountall mountcritlocal \ - mountcritremote mountd moused mrouted \ + makemandb mdnsd mixerctl modules mopd motd mountall \ + mountcritlocal mountcritremote mountd moused mrouted \ named ndbootd network newsyslog nfsd nfslocking npf ntpd \ ntpdate \ perusertmp pf pf_boot pflogd postfix powerd ppp pwcheck \ Index: src/share/man/man5/Makefile diff -u src/share/man/man5/Makefile:1.70 src/share/man/man5/Makefile:1.71 --- src/share/man/man5/Makefile:1.70 Sat Dec 28 17:35:01 2013 +++ src/share/man/man5/Makefile Sat Mar 21 19:10:43 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.70 2013/12/28 17:35:01 christos Exp $ +# $NetBSD: Makefile,v 1.71 2015/03/21 19:10:43 jmcneill Exp $ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # missing: dump.5 plot.5 @@ -9,8 +9,8 @@ MAN= a.out.5 acct.5 ar.5 boot.cfg.5 \ fs.5 fstab.5 genassym.cf.5 gpio.conf.5 group.5 hesiod.conf.5 \ hosts.5 hosts.equiv.5 ifaliases.5 ifconfig.if.5 intro.5 \ ipsec.conf.5 ld.so.conf.5 link.5 locale.alias.5 \ - locate.conf.5 login.conf.5 mixerctl.conf.5 mk.conf.5 monthly.5 \ - motd.5 netconfig.5 netgroup.5 networks.5 nologin.5 \ + locate.conf.5 login.conf.5 mixerctl.conf.5 modules.conf.5 mk.conf.5 \ + monthly.5 motd.5 netconfig.5 netgroup.5 networks.5 nologin.5 \ nsswitch.conf.5 passwd.5 passwd.conf.5 phones.5 \ printcap.5 protocols.5 ranlib.5 rc.conf.5 remote.5 \ resolv.conf.5 route.conf.5 rpc.5 \ Index: src/usr.sbin/postinstall/postinstall diff -u src/usr.sbin/postinstall/postinstall:1.189 src/usr.sbin/postinstall/postinstall:1.190 --- src/usr.sbin/postinstall/postinstall:1.189 Sat Feb 21 23:13:00 2015 +++ src/usr.sbin/postinstall/postinstall Sat Mar 21 19:10:43 2015 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall,v 1.189 2015/02/21 23:13:00 joerg Exp $ +# $NetBSD: postinstall,v 1.190 2015/03/21 19:10:43 jmcneill Exp $ # # Copyright (c) 2002-2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -1366,6 +1366,7 @@ lvm makemandb mdnsd mixerctl +modules mopd motd mountall Added files: Index: src/etc/rc.d/modules diff -u /dev/null src/etc/rc.d/modules:1.1 --- /dev/null Sat Mar 21 19:10:44 2015 +++ src/etc/rc.d/modules Sat Mar 21 19:10:43 2015 @@ -0,0 +1,30 @@ +#!/bin/sh +# +# $NetBSD: modules,v 1.1 2015/03/21 19:10:43 jmcneill Exp $ +# + +# PROVIDE: modules +# BEFORE: securelevel + +$_rc_subr_loaded . /etc/rc.subr + +name="modules" +rcvar=$name +start_cmd="modules_start" +stop_cmd=":" + +modules_start() +{ + if [ -f /etc/modules.conf ]; then + echo "Loading modules." + cat /etc/modules.conf | + while read -r args; do + args=${args%%#*} # strip comments + test -z "$args" && continue + /sbin/modload $args + done + fi +} + +load_rc_config $name +run_rc_command "$1" Index: src/share/man/man5/modules.conf.5 diff -u /dev/null src/share/man/man5/modules.conf.5:1.1 --- /dev/null Sat Mar 21 19:10:44 2015 +++ src/share/man/man5/modules.conf.5 Sat Mar 21 19:10:43 2015 @@ -0,0 +1,58 @@ +.\" $NetBSD: modules.conf.5,v 1.1 2015/03/21 19:10:43 jmcneill Exp $ +.\" +.\" Copyright (c) 2015 Jared McNeill <jmcne...@invisible.ca> +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd March 21, 2015 +.Dt MODULES.CONF 5 +.Os +.Sh NAME +.Nm modules.conf +.Nd Kernel module config file +.Sh DESCRIPTION +The +.Nm +file is read by the +.Pa modules +rc.d script during system start-up to load modules at boot, +before the system security level is raised. +.Ss FILE FORMAT +Lines starting with a hash +.Pq Sq # +and empty lines are ignored. +All other lines are passed to +.Xr modload 8 . +.Sh FILES +.Bl -tag -width XXetcXmodulesXconfXX +.It Pa /etc/modules.conf +The +.Nm +configuration file resides in +.Pa /etc . +.It Pa /etc/rc.d/modules +.Xr rc.d 8 +script that parses +.Nm . +.Sh SEE ALSO +.Xr modload 8 , +.Xr rc 8