Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 72551 - Patch that prevents an error message when service pcmcia is stopped on a system without modular kernel
Summary: Patch that prevents an error message when service pcmcia is stopped on a syst...
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High trivial (vote)
Assignee: Mobile Herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 68964
  Show dependency tree
 
Reported: 2004-11-26 07:27 UTC by Erik
Modified: 2009-05-30 16:33 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erik 2004-11-26 07:27:48 UTC
I got an error message from fgrep when the pcmcia service was stopped. That was because the script assumed that the kernel was built with module support. I made a small patch to avoid the error. I would appreciate if it (or something functionally equivalent) was integrated into the distribution.
--- /etc/init.d/pcmcia~ 2004-11-19 19:09:31.000000000 +0100
+++ /etc/init.d/pcmcia 2004-11-26 13:41:52.617813832 +0100
@@ -77,8 +77,10 @@
  code=$? 
 
- if [ -n `fgrep "ds " /proc/modules | head -n1 | cut -c1` ]; then
-  /sbin/rmmod ds 2> /dev/null
-  /sbin/rmmod $PCIC 2> /dev/null
-  /sbin/rmmod pcmcia_core 2> /dev/null
+ if [ -e /proc/modules ]; then
+   if [ -n `fgrep "ds " /proc/modules | head -n1 | cut -c1` ]; then
+     /sbin/rmmod ds 2> /dev/null
+     /sbin/rmmod $PCIC 2> /dev/null
+     /sbin/rmmod pcmcia_core 2> /dev/null
+   fi
  fi

Reproducible: Always
Steps to Reproduce:
Comment 1 Henrik Brix Andersen 2005-04-25 05:13:53 UTC
Fixed in sys-apps/pcmcia-cs-3.2.8. Thank you for reporting this.