slitaz-boot-scripts rev 137

hwconf.sh: module can be listed but not installed
author Christophe Lincoln <pankso@slitaz.org>
date Wed Feb 18 01:35:59 2009 +0100 (2009-02-18)
parents d3bf7f751e5f
children de639c1eb4db
files etc/init.d/hwconf.sh
line diff
     1.1 --- a/etc/init.d/hwconf.sh	Tue Feb 17 23:26:53 2009 +0100
     1.2 +++ b/etc/init.d/hwconf.sh	Wed Feb 18 01:35:59 2009 +0100
     1.3 @@ -14,10 +14,14 @@
     1.4  	MODULES_LIST=`lspci -k | grep "modules" | cut -d ":" -f 2 | sed s/-/_/g`
     1.5  	for mod in $MODULES_LIST
     1.6  	do
     1.7 -		if ! lsmod | grep -q "$mod" && [ -f "$(modprobe -l $mod)" ]; then
     1.8 -			echo "Loading Kernel modules: $mod"
     1.9 -			detect="$detect $mod"
    1.10 -			/sbin/modprobe $mod
    1.11 +		if ! lsmod | grep -q "$mod"; then
    1.12 +			if [ -f "$(modprobe -l $mod)" ]; then
    1.13 +				echo "Loading Kernel modules: $mod"
    1.14 +				detect="$detect $mod"
    1.15 +				/sbin/modprobe $mod
    1.16 +			else
    1.17 +				echo "Missing module: $mod"
    1.18 +			fi
    1.19  		fi
    1.20  	done
    1.21  	# yenta_socket = laptop