Bug 3967 - Load all possible modules
Summary: Load all possible modules
Alias: None
Product: Sisyphus
Classification: Development
Component: lm_sensors (show other bugs)
Version: unstable
Hardware: all Linux
: P1 enhancement
Assignee: Nobody's working on this, feel free to take it
QA Contact: qa-sisyphus
Depends on:
Reported: 2004-04-13 18:32 MSD by ed
Modified: 2005-08-31 03:57 MSD (History)
0 users

See Also:

patch (529 bytes, patch)
2004-04-13 18:36 MSD, ed
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
Comment 2 ed 2004-04-13 18:39:15 MSD
Comment on attachment 382 [details]

--- /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))
Comment 3 Sergey Vlasov 2004-06-06 20:40:44 MSD
Fixed in lm_sensors-2.8.6-alt2.