slitaz-boot-scripts diff etc/init.d/hwconf.sh @ rev 120

hwconf.sh: check module exists during PCI detection
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Oct 23 20:54:35 2008 +0000 (2008-10-23)
parents 58cc6775e0f0
children d3d07a6cb5fe
line diff
     1.1 --- a/etc/init.d/hwconf.sh	Sat Jul 19 06:54:49 2008 +0000
     1.2 +++ b/etc/init.d/hwconf.sh	Thu Oct 23 20:54:35 2008 +0000
     1.3 @@ -22,9 +22,11 @@
     1.4  	do
     1.5  		if ! `lsmod | grep -q "$mod"` && ! `echo  $BLACKLIST_MODULES | grep -q "$mod"`; then
     1.6  			modname=`echo "$mod" | sed s/_/-/g`
     1.7 -			echo "Loading Kernel modules: $modname"
     1.8 -			detect="$detect $modname"
     1.9 -			/sbin/modprobe $modname
    1.10 +			if [ -n "$(modprobe -l $modname") ]; then
    1.11 +				echo "Loading Kernel modules: $modname"
    1.12 +				detect="$detect $modname"
    1.13 +				/sbin/modprobe $modname
    1.14 +			fi
    1.15  		fi
    1.16  	done
    1.17  	# yenta_socket = laptop