Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 72551

Summary: Patch that prevents an error message when service pcmcia is stopped on a system without modular kernel
Product: Gentoo Linux Reporter: Erik <esigra>
Component: [OLD] UnspecifiedAssignee: Mobile Herd (OBSOLETE) <mobile+disabled>
Status: VERIFIED FIXED    
Severity: trivial    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 68964    

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.