Bug 107199 - rc.sysinit loads unneeded toshiba_acpi module
rc.sysinit loads unneeded toshiba_acpi module
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
: 109940 115680 116689 116785 (view as bug list)
Depends On:
Blocks: FC2Target
  Show dependency treegraph
 
Reported: 2003-10-15 15:13 EDT by Gerald Teschl
Modified: 2014-03-16 22:39 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-05-04 00:59:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Gerald Teschl 2003-10-15 15:13:19 EDT
I have a custom kernel which has some additional acpi modules compiled:
asus_acpi and toschiba_acpi. The current code tries to load this
modules even though this is a sony laptop. Causing unneeded modules to
be loaded respectively errors during boot.

Hence I suggest something like:


--- rc.sysinit.save     2003-10-15 21:00:16.000000000 +0200
+++ rc.sysinit  2003-10-15 21:06:32.000000000 +0200
@@ -171,8 +171,11 @@

 # Initialiaze ACPI bits
 if [ -d /proc/acpi ]; then
-   for module in /lib/modules/`uname -r`/kernel/drivers/acpi/* ; do
-      insmod $module
+   ACPIMODULES="ac battery button fan processor thermal"
+   [ -f /etc/sysconfig/acpi ] && . /etc/sysconfig/acpi
+   modulesdir=/lib/modules/`uname -r`/kernel/drivers/acpi
+   for module in $ACPIMODULES ; do
+      [ -f $modulesdir/$module.o ] && modprobe $module
    done
 fi
Comment 1 Bill Nottingham 2003-10-15 15:15:49 EDT
I'd rather not have to keep a list of what new modules may end up being
'required' and then have to change initscripts whenever the kernel changes.
Comment 2 Ian Pilcher 2003-11-07 23:02:17 EST
How about this?

--- rc.sysinit.orig     2003-11-07 21:38:40.000000000 -0600
+++ rc.sysinit  2003-11-07 21:45:05.000000000 -0600
@@ -171,9 +171,16 @@

 # Initialiaze ACPI bits
 if [ -d /proc/acpi ]; then
-   for module in /lib/modules/`uname -r`/kernel/drivers/acpi/* ; do
-      insmod $module
-   done
+    if [ -f /etc/sysconfig/acpi ]; then
+        . /etc/sysconfig/acpi
+       for module in $ACPIMODULES ; do
+           modprobe $module
+       done
+    else
+       for module in /lib/modules/`uname -r`/kernel/drivers/acpi/* ; do
+         insmod $module
+       done
+    fi
 fi

 # Initialize USB controller and HID devices
Comment 3 Gerald Teschl 2003-11-11 02:53:43 EST
Seconded.
Comment 4 Sergey V. Udaltsov 2003-11-13 04:47:30 EST
Yes, the message about toshiba_acpi failure is really annoying. Users
think there is a error here - while actually it is not.
Comment 5 Bastien Nocera 2003-12-19 20:40:40 EST
*** Bug 109940 has been marked as a duplicate of this bug. ***
Comment 6 Bill Nottingham 2004-02-15 23:04:26 EST
*** Bug 115680 has been marked as a duplicate of this bug. ***
Comment 7 Thomas M Steenholdt 2004-02-23 17:21:30 EST
I'm not sure exactly how things are in this area. I'd link to think
that modules will load on the hardware that they support and nothing
else. In this case meaning that if the toshiba_acpi.ko can't be loaded
it must be because it won't work on the target machine. If this is all
true - Why can't we handle this simply by redirecting insmod output to
/dev/null and perhaps doing some checks in /proc to see if things look
okay?
Comment 8 Bill Nottingham 2004-02-24 11:58:07 EST
*** Bug 116689 has been marked as a duplicate of this bug. ***
Comment 9 Bill Nottingham 2004-02-25 01:18:45 EST
*** Bug 116785 has been marked as a duplicate of this bug. ***
Comment 10 Bill Nottingham 2004-05-04 00:59:31 EDT
This message has been cleaned up.

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