slitaz-boot-scripts 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 17a47d2b869e
children 03088acac44f
files etc/init.d/hwconf.sh
line diff
     1.1 --- a/etc/init.d/hwconf.sh	Mon Oct 20 07:53:10 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