Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 47527 - change network script in pcmcia-cs packet to stop only the net device if is it running and readd the start_fn() and stop_fn() funkctions
Summary: change network script in pcmcia-cs packet to stop only the net device if is i...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Mobile Herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 68964
  Show dependency tree
 
Reported: 2004-04-11 11:02 UTC by stephan wezel
Modified: 2005-04-25 04:34 UTC (History)
0 users

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


Attachments
diff of my changes in the network script of pcmcia-cs (network.diff,714 bytes, text/plain)
2004-04-11 11:07 UTC, stephan wezel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stephan wezel 2004-04-11 11:02:59 UTC
I had following problems with the network script from pcmcia-cs:

1.the config file network.opts offers an option for the functions
start_fn() ans stop_fn() (which I use to start/stop my onboard nic if I insert my wirelss card).
But in the network script these functions won
Comment 1 stephan wezel 2004-04-11 11:02:59 UTC
I had following problems with the network script from pcmcia-cs:

1.the config file network.opts offers an option for the functions
start_fn() ans stop_fn() (which I use to start/stop my onboard nic if I insert my wirelss card).
But in the network script these functions won´t be called if an pcmcia device is inserted or ejected (in the original network script they will be called).

2. If my wlan card is inserted while rebooting/shutdown the system i became a message that the device isn`t running, if cardmgr tries to stop the device.
Through this message it seems that the root filesystem isn`t cleanly unmounted,because on next boot i become the message that the root filesystem wasn`t cleanly unmounted.

To solve these problems i have readd the nessary lines for the start/stop_fn functions and i have add some lines to stop the network device only if the device is running.

it seems that all pcmcia-cs ebuilds >=3.2.5-r1 have this "problem"

I have attached the diff of my changes in the network script
Comment 2 stephan wezel 2004-04-11 11:07:02 UTC
Created attachment 29093 [details]
diff of my changes in the network script of pcmcia-cs
Comment 3 stephan wezel 2004-04-12 02:56:54 UTC
Here is my diff also as pure text:

--- network	2004-03-21 20:43:56.000000000 +0100
+++ /etc/pcmcia/network	2004-04-11 19:15:01.000000000 +0200
@@ -9,6 +9,10 @@
 # Load site-specific settings
 ADDRESS="$SCHEME,$SOCKET,$INSTANCE,$HWADDR"
 
+start_fn () { return; }
+stop_fn () { return; }
+. $0.opts
+
 RESOLV=/etc/resolv.conf
 
 # Now, run the specific script for Wireless LAN interfaces
@@ -21,14 +25,18 @@
     . /etc/pcmcia/wireless
 fi
 INFO=$O_INFO
-
+DEV=`ifconfig | grep $DEVICE`
 
 case "${ACTION}" in
 	"start" | "resume" )
 		/etc/init.d/net.$DEVICE start
+		start_fn $DEVICE
 		;;
 	"stop")
-		/etc/init.d/net.$DEVICE stop
+		if [ ! -z "$DEV" ]; then
+		    /etc/init.d/net.$DEVICE stop
+		    stop_fn $DEVICE
+		fi
 		;;
 	"check")
 		;;
Comment 4 Henrik Brix Andersen 2005-04-25 04:34:57 UTC
The start_fn() and stop_fn() functionality is generalized under Gentoo - you use the preup(), postup(), predown() and postdown() functions in /etc/conf.d/net.