Bug 107199 - rc.sysinit loads unneeded toshiba_acpi module
Summary: rc.sysinit loads unneeded toshiba_acpi module
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
: 109940 115680 116689 116785 (view as bug list)
Depends On:
Blocks: FC2Target
TreeView+ depends on / blocked
 
Reported: 2003-10-15 19:13 UTC by Gerald Teschl
Modified: 2014-03-17 02:39 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-05-04 04:59:31 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Gerald Teschl 2003-10-15 19:13:19 UTC
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 19:15:49 UTC
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-08 04:02:17 UTC
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 07:53:43 UTC
Seconded.

Comment 4 Sergey V. Udaltsov 2003-11-13 09:47:30 UTC
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-20 01:40:40 UTC
*** Bug 109940 has been marked as a duplicate of this bug. ***

Comment 6 Bill Nottingham 2004-02-16 04:04:26 UTC
*** Bug 115680 has been marked as a duplicate of this bug. ***

Comment 7 Thomas M Steenholdt 2004-02-23 22:21:30 UTC
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 16:58:07 UTC
*** Bug 116689 has been marked as a duplicate of this bug. ***

Comment 9 Bill Nottingham 2004-02-25 06:18:45 UTC
*** Bug 116785 has been marked as a duplicate of this bug. ***

Comment 10 Bill Nottingham 2004-05-04 04:59:31 UTC
This message has been cleaned up.


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