Module Name: src Committed By: martin Date: Thu Mar 26 10:54:36 UTC 2015
Modified Files: src/distrib/sets/lists/etc [netbsd-7]: mi src/distrib/sets/lists/man [netbsd-7]: mi src/etc/defaults [netbsd-7]: rc.conf src/etc/mtree [netbsd-7]: special src/etc/rc.d [netbsd-7]: Makefile src/share/man/man5 [netbsd-7]: Makefile Added Files: src/etc/rc.d [netbsd-7]: modules src/share/man/man5 [netbsd-7]: modules.conf.5 Log Message: Pull up following revision(s) (requested by jmcneill in ticket #635): etc/rc.d/Makefile: revision 1.92 distrib/sets/lists/man/mi: revision 1.1497 share/man/man5/Makefile: revision 1.71 etc/defaults/rc.conf: revision 1.132 etc/rc.d/modules: revision 1.1 usr.sbin/postinstall/postinstall: revision 1.190 distrib/sets/lists/etc/mi: revision 1.236 etc/mtree/special: revision 1.152 share/man/man5/modules.conf.5: revision 1.1 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.232 -r1.232.4.1 src/distrib/sets/lists/etc/mi cvs rdiff -u -r1.1485.2.5 -r1.1485.2.6 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.123.2.1 -r1.123.2.2 src/etc/defaults/rc.conf cvs rdiff -u -r1.148 -r1.148.2.1 src/etc/mtree/special cvs rdiff -u -r1.89 -r1.89.6.1 src/etc/rc.d/Makefile cvs rdiff -u -r0 -r1.1.2.2 src/etc/rc.d/modules cvs rdiff -u -r1.70 -r1.70.4.1 src/share/man/man5/Makefile cvs rdiff -u -r0 -r1.1.2.2 src/share/man/man5/modules.conf.5 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.232 src/distrib/sets/lists/etc/mi:1.232.4.1 --- src/distrib/sets/lists/etc/mi:1.232 Sun Aug 11 22:29:03 2013 +++ src/distrib/sets/lists/etc/mi Thu Mar 26 10:54:36 2015 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.232 2013/08/11 22:29:03 joerg Exp $ +# $NetBSD: mi,v 1.232.4.1 2015/03/26 10:54:36 martin Exp $ # # Note: end-user configuration files that are moved to another location # should not be marked "obsolete"; they should just be removed from @@ -230,6 +230,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.1485.2.5 src/distrib/sets/lists/man/mi:1.1485.2.6 --- src/distrib/sets/lists/man/mi:1.1485.2.5 Mon Jan 12 10:22:22 2015 +++ src/distrib/sets/lists/man/mi Thu Mar 26 10:54:35 2015 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1485.2.5 2015/01/12 10:22:22 martin Exp $ +# $NetBSD: mi,v 1.1485.2.6 2015/03/26 10:54:35 martin Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -2112,6 +2112,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 @@ -5076,6 +5077,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 @@ -7987,6 +7989,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.123.2.1 src/etc/defaults/rc.conf:1.123.2.2 --- src/etc/defaults/rc.conf:1.123.2.1 Fri Jan 23 09:47:24 2015 +++ src/etc/defaults/rc.conf Thu Mar 26 10:54:36 2015 @@ -1,4 +1,4 @@ -# $NetBSD: rc.conf,v 1.123.2.1 2015/01/23 09:47:24 martin Exp $ +# $NetBSD: rc.conf,v 1.123.2.2 2015/03/26 10:54:36 martin 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.148 src/etc/mtree/special:1.148.2.1 --- src/etc/mtree/special:1.148 Tue Aug 5 07:34:52 2014 +++ src/etc/mtree/special Thu Mar 26 10:54:36 2015 @@ -1,4 +1,4 @@ -# $NetBSD: special,v 1.148 2014/08/05 07:34:52 dholland Exp $ +# $NetBSD: special,v 1.148.2.1 2015/03/26 10:54:36 martin Exp $ # @(#)special 8.2 (Berkeley) 1/23/94 # # This file may be overwritten on upgrades. @@ -226,6 +226,7 @@ ./etc/rc.d/lpd type=file mode=0555 ./etc/rc.d/lvm 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.89 src/etc/rc.d/Makefile:1.89.6.1 --- src/etc/rc.d/Makefile:1.89 Thu May 16 07:37:05 2013 +++ src/etc/rc.d/Makefile Thu Mar 26 10:54:35 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.89 2013/05/16 07:37:05 yamt Exp $ +# $NetBSD: Makefile,v 1.89.6.1 2015/03/26 10:54:35 martin Exp $ .include <bsd.own.mk> @@ -26,8 +26,8 @@ CONFIGFILES=\ irdaattach iscsi_target 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.70.4.1 --- src/share/man/man5/Makefile:1.70 Sat Dec 28 17:35:01 2013 +++ src/share/man/man5/Makefile Thu Mar 26 10:54:35 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.70 2013/12/28 17:35:01 christos Exp $ +# $NetBSD: Makefile,v 1.70.4.1 2015/03/26 10:54:35 martin 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 \ Added files: Index: src/etc/rc.d/modules diff -u /dev/null src/etc/rc.d/modules:1.1.2.2 --- /dev/null Thu Mar 26 10:54:36 2015 +++ src/etc/rc.d/modules Thu Mar 26 10:54:35 2015 @@ -0,0 +1,30 @@ +#!/bin/sh +# +# $NetBSD: modules,v 1.1.2.2 2015/03/26 10:54:35 martin 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.2.2 --- /dev/null Thu Mar 26 10:54:36 2015 +++ src/share/man/man5/modules.conf.5 Thu Mar 26 10:54:35 2015 @@ -0,0 +1,58 @@ +.\" $NetBSD: modules.conf.5,v 1.1.2.2 2015/03/26 10:54:35 martin 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