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
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
Created attachment 29093 [details] diff of my changes in the network script of pcmcia-cs
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") ;;
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.