public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andrew Gaffney (agaffney)" <agaffney@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] genkernel r675 - in trunk: . generic
Date: Fri, 09 May 2008 22:15:47 +0000	[thread overview]
Message-ID: <E1JuasV-0005Gl-1R@stork.gentoo.org> (raw)

Author: agaffney
Date: 2008-05-09 22:15:46 +0000 (Fri, 09 May 2008)
New Revision: 675

Modified:
   trunk/ChangeLog
   trunk/generic/initrd.defaults
   trunk/generic/initrd.scripts
   trunk/generic/linuxrc
Log:
Add nomodules kernel commandline parameter to disable loading of modules

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2008-05-09 16:13:09 UTC (rev 674)
+++ trunk/ChangeLog	2008-05-09 22:15:46 UTC (rev 675)
@@ -2,6 +2,10 @@
 # Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  09 May 2008; Andrew Gaffney <agaffney@gentoo.org> generic/initrd.defaults,
+  generic/initrd.scripts, generic/linuxrc:
+  Add nomodules kernel commandline parameter to disable loading of modules
+
   09 May 2008; Andrew Gaffney <agaffney@gentoo.org> gen_funcs.sh, genkernel,
   genkernel.conf:
   Move distfile cache to /var/cache/genkernel/src and add check to make sure

Modified: trunk/generic/initrd.defaults
===================================================================
--- trunk/generic/initrd.defaults	2008-05-09 16:13:09 UTC (rev 674)
+++ trunk/generic/initrd.defaults	2008-05-09 22:15:46 UTC (rev 675)
@@ -77,5 +77,5 @@
 
 # Only sections that are in by default or those that
 # are not module groups need to be defined here...
-HWOPTS='keymap cache pata sata scsi usb firewire slowusb evms lvm dmraid mdadm fs net'
-MY_HWOPTS='pata sata scsi usb firewire dmraid mdadm fs net'
+HWOPTS='keymap cache modules pata sata scsi usb firewire slowusb evms lvm dmraid mdadm fs net'
+MY_HWOPTS='modules pata sata scsi usb firewire dmraid mdadm fs net'

Modified: trunk/generic/initrd.scripts
===================================================================
--- trunk/generic/initrd.scripts	2008-05-09 16:13:09 UTC (rev 674)
+++ trunk/generic/initrd.scripts	2008-05-09 22:15:46 UTC (rev 675)
@@ -448,13 +448,11 @@
 		do
 			if [ "${y}" = "${x}" ]
 			then 
-				FOUND=1
+				continue 2
 			fi
 		done
-		if [ ! "${FOUND}" = '1' ]
-		then
-			TMP_HWOPTS="${TMP_HWOPTS} ${x}"
-		fi
+		TMP_HWOPTS="${TMP_HWOPTS} ${x}"
+		eval DO_`echo ${x} | sed 's/-//'`=1
 	done
 
 	MY_HWOPTS=${TMP_HWOPTS}
@@ -470,7 +468,6 @@
 		for modules in $MY_HWOPTS
 		do
 			modules_scan $modules
-			eval DO_`echo $modules | sed 's/-//'`=1
 		done
 	else
 		good_msg 'Skipping module load; no modules in the initrd!'

Modified: trunk/generic/linuxrc
===================================================================
--- trunk/generic/linuxrc	2008-05-09 16:13:09 UTC (rev 674)
+++ trunk/generic/linuxrc	2008-05-09 22:15:46 UTC (rev 675)
@@ -203,8 +203,11 @@
 setup_hotplug
 
 # Load modules listed in MY_HWOPTS if /lib/modules exists for the running kernel
-if [ -d "/lib/modules/${KV}" ]
+if [ -z "${DO_modules}" ]
 then
+	good_msg 'Skipping module load; disabled via commandline'
+elif [ -d "/lib/modules/${KV}" ]
+then
 	good_msg 'Loading modules'
 	# Load appropriate kernel modules
 	if [ "${NODETECT}" != '1' ]
@@ -212,16 +215,11 @@
 		for modules in ${MY_HWOPTS}
 		do
 			modules_scan ${modules}
-			eval DO_`echo ${modules} | sed 's/-//'`=1
 		done
 	fi
 	# Always eval doload=...
 	modules_load ${MDOLIST}
 else
-	for modules in ${MY_HWOPTS}
-	do
-		eval DO_`echo ${modules} | sed 's/-//'`=1
-	done
 	good_msg 'Skipping module load; no modules in the initrd!'
 fi
 

-- 
gentoo-commits@lists.gentoo.org mailing list



                 reply	other threads:[~2008-05-09 22:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1JuasV-0005Gl-1R@stork.gentoo.org \
    --to=agaffney@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox