Bug 89264 - /etc/init.d/pcmcia coding error (w/ rebuilt kernel)
Summary: /etc/init.d/pcmcia coding error (w/ rebuilt kernel)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel-pcmcia-cs
Version: 9
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-04-22 01:18 UTC by Need Real Name
Modified: 2007-04-18 16:53 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-09-08 06:58:33 UTC


Attachments (Terms of Use)

Description Need Real Name 2003-04-22 01:18:20 UTC
Description of problem:
After rebuilding a kernel from the kernel-source rpm provided, I noticed that
the pcmcia modules were not being loaded (reverting to the original install
kernel still worked).  After hunting down a number of things, here's what I came
up with...

1. The kernel build/modules_install process creates a
/lib/modules/<kernel_tag>/pcmcia directory.  The original (installed)
/lib/modules/2.4.20-8/ does not have this directory.

2. The /etc/init.d/pcmcia script keys of the existence of this directory and
executes a different syntax for 'modprobe pcmcia_core.'  I thought it wasn't
possible (and I still think that), but calling 'modprobe pcmcia_core.o' will
fail (the '.o' shouldn't be there... see code below).

Here's the code block from the pcmcia script (with my comments added)...
if [ -d /lib/modules/preferred ] ; then
                PC=/lib/modules/preferred/pcmcia
            else
                PC=/lib/modules/`uname -r`/pcmcia
            fi
            KD=/lib/modules/`uname -r`/kernel/drivers/pcmcia
            # MY COMMENT: THIS IS WHERE IT WAS MESSED UP.
            # MY COMMENT: THE NEW KERNEL's modules directory had a 
            # MY COMMENT: top-level pcmcia dir which dropped into 
            # MY COMMENT: this first if block.
            # The elif block is the right one.
            if [ -d $PC ] ; then
                echo -n " modules"
                # MY COMMENT: how does this work? I think the .o
                # MY COMMENT: shouldn't be there.
                # MY COMMENT: Looking at the same script for Redhat 
                # MY COMMENT: 7.3, the lines have "$PC/" prefixing
                # MY COMMENT: the module name like so...
                # MY COMMENT: /sbin/modprobe $PC/pcmcia_core.o $CORE_OPTS
                # MY COMMENT: This makes _more_ sense, but I don't think
                # MY COMMENT: it'll work.
                /sbin/modprobe pcmcia_core.o $CORE_OPTS
                /sbin/modprobe $PCIC.o $PCIC_OPTS
                /sbin/modprobe ds.o
            elif [ -d $KD ] ; then
                /sbin/modprobe pcmcia_core
                /sbin/modprobe $PCIC
                /sbin/modprobe ds
            else
                echo $" module directory $PC not found."
                break
            fi

I can fix it either by modifying the script or blowing away the
/lib/modules/<kernel_tag>/pcmcia directory (since it just contains symlinks
to the kernel directory versions.

Version-Release number of selected component (if applicable):
Standard RedHat 9 (Shrike) release.

How reproducible:
Recompiling everything now... but, assuming the error is in the pcmcia script,
then it's not a kernel compilation error, it's a script logic error.

Steps to Reproduce:
1.
2.
3.
    
Actual results:


Expected results:


Additional info:

Comment 1 Bill Nottingham 2004-09-08 06:58:33 UTC
This was fixed in an update to FC1, and in current trees.


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