Bug 3967 - Load all possible modules
: Load all possible modules
Status: CLOSED FIXED
: Sisyphus
(All bugs in Sisyphus/lm_sensors)
: unstable
: all Linux
: P1 enhancement
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2004-04-13 18:32 by
Modified: 2005-08-31 03:57 (History)


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


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2004-04-13 18:32:40
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 From 2004-04-13 18:36:13 -------
Created an attachment (id=382) [details]
patch
------- Comment #2 From 2004-04-13 18:39:15 -------
(From update of 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))
	done

------- Comment #3 From 2004-06-06 20:40:44 -------
Fixed in lm_sensors-2.8.6-alt2.