Bug 89264 - /etc/init.d/pcmcia coding error (w/ rebuilt kernel)
/etc/init.d/pcmcia coding error (w/ rebuilt kernel)
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: kernel-pcmcia-cs (Show other bugs)
9
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-04-21 21:18 EDT by Need Real Name
Modified: 2007-04-18 12:53 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-08 02:58:33 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 Need Real Name 2003-04-21 21:18:20 EDT
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 02:58:33 EDT
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.