# HG changeset patch # User Eric Joseph-Alexandre # Date 1211977430 -7200 # Node ID 79fc62b090f81ba341230d5c9a18857d8af903ab # Parent 4ac520b89d9b2f02c8fe3309352f8de8ddd6d9a7 Allow to blacklist modules diff -r 4ac520b89d9b -r 79fc62b090f8 etc/init.d/hwconf.sh --- a/etc/init.d/hwconf.sh Wed May 21 14:40:33 2008 +0000 +++ b/etc/init.d/hwconf.sh Wed May 28 14:23:50 2008 +0200 @@ -13,11 +13,14 @@ # Detect PCI devices and load kernel module only at first boot # or in LiveCD mode. if [ ! -s /var/lib/detected-modules ]; then + + . /etc/rcS.conf + echo "Detecting PCI devices..." MODULES_LIST=`lspci -k | grep "modules" | cut -d ":" -f 2 | sed s/-/_/g` for mod in $MODULES_LIST do - if ! `lsmod | grep -q "$mod"`; then + if ! `lsmod | grep -q "$mod"` && ! `echo $BLACKLIST_MODULES | grep -q "$mod"`; then modname=`echo "$mod" | sed s/_/-/g` echo "Loading Kernel modules: $modname" detect="$detect $modname" @@ -32,7 +35,7 @@ fi echo "$detect" > /var/lib/detected-modules # Now add modules to rcS.conf - . /etc/rcS.conf + load=`echo "$LOAD_MODULES $detect" | sed s/" "/" "/g` sed -i s/"LOAD_MODULES=\"$LOAD_MODULES\""/"LOAD_MODULES=\"$load\""/ \ /etc/rcS.conf diff -r 4ac520b89d9b -r 79fc62b090f8 etc/rcS.conf --- a/etc/rcS.conf Wed May 21 14:40:33 2008 +0000 +++ b/etc/rcS.conf Wed May 28 14:23:50 2008 +0200 @@ -24,6 +24,9 @@ # LOAD_MODULES="vfat nls_utf8 ohci_hcd" +# Kernel modules that we never want to load. +BLACKLIST_MODULES="" + # Initialisation scripts to run at boot time. Boot order is important, # bootopts.sh (boot options) must start first, then you free to choose. Note # that the local.sh script exist to let you quick add some local startup