Bug 3967

Summary: Load all possible modules
Product: Sisyphus Reporter: ed <ed>
Component: lm_sensorsAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: enhancement    
Priority: P1    
Version: unstable   
Hardware: all   
OS: Linux   
Attachments:
Description Flags
patch none

Description ed 2004-04-13 18:32:40 MSD
When lm_sensors service starts it tries to load the needed kernel modules, but if
modprobe fails it don't try to load rest of the modules.
In the 2.6.x kernels it may be real problem, because not all of the chipset
modules ported to 2.6 for now, but sensors-detect may recommend a driver that is
not present and write it's name to the /etc/sysconfig/lm_sensors.


Steps to Reproduce:
1.run sensors-detect on the box with the need of lm87(or another not ported driver)
2.run service lm_sensors start - it fails

Actual Results:  
service failed to start

Expected Results:  
it should load all possible modules
Comment 1 ed 2004-04-13 18:36:13 MSD
Created attachment 382 [details]
patch
Comment 2 ed 2004-04-13 18:39:15 MSD
Comment on attachment 382 [details]
patch

--- /etc/init.d/lm_sensors.orig 2004-04-13 06:05:22 +0400
+++ /etc/init.d/lm_sensors	2004-04-13 06:15:44 +0400
@@ -82,9 +82,13 @@
	while [ $RETVAL -eq 0 ]; do
		module="`eval echo '$'MODULE_$i`"
		[ -n "$module" ] || break
-		echo -n "$module "
-		/sbin/modprobe $module &>/dev/null
-		RETVAL=$?
+		if modinfo -n $module 2>&1 | grep -qv 'no module by that name
found' ; then
+			echo -n "$module "
+			/sbin/modprobe $module &>/dev/null
+			RETVAL=$?
+		else
+			echo -n "$module(not found) "
+		fi
		i=$(($i + 1))
	done
Comment 3 Sergey Vlasov 2004-06-06 20:40:44 MSD
Fixed in lm_sensors-2.8.6-alt2.