--- pcmcia-cs/etc/network.old 2004-07-01 00:31:59.000000000 +0100 +++ pcmcia-cs/etc/network 2004-07-01 00:32:57.000000000 +0100 @@ -31,16 +31,39 @@ RESOLV=/etc/resolv.conf +# if this interface has an entry in /etc/network/interfaces, let ifupdown +# handle it +if grep -q "iface \+$DEVICE" /etc/network/interfaces; then + case $ACTION in + start) + ifup $DEVICE + ;; + stop) + ifdown $DEVICE + ;; + restart) + ifdown $DEVICE + ifup $DEVICE + ;; + esac + + exit 0 +fi + +## see if it is a wireless card. Jamey and AntiProxy +CHECK_WIRELESS=`grep "$DEVICE" /proc/net/wireless` +if [ -n "$CHECK_WIRELESS" ] ; then # Now, run the specific script for Wireless LAN interfaces # Note : we need the wireless parameters to be set up before IP parameters, # so that we can perform DHCP over the Wireless link if needed. Jean II -O_INFO=$INFO ; INFO= -if [ -x ./wireless ] ; then - . ./wireless -else - . /etc/pcmcia/wireless + O_INFO=$INFO ; INFO= + if [ -x ./wireless ] ; then + . ./wireless + else + . /etc/pcmcia/wireless + fi + INFO=$O_INFO fi -INFO=$O_INFO bootp_setup () { @@ +225,6 -188,11 @@ fi /sbin/dhcpcd -XYZZY 2>&1 | grep -q DHCP || \ rm -f /var/run/dhcpcd-$DEVICE.pid + # modified for udhcpc + elif [ -x /sbin/udhcpc ] ; then + PID=`cat /var/run/udhcpc.$DEVICE.pid 2>/dev/null` + if [ -n "$PID" ] ; then kill -TERM $PID ; fi + # end of modification elif [ -x /sbin/dhclient ] ; then PID=`cat /var/run/dhclient.pid 2>/dev/null` if [ -n "$PID" ] ; then kill -TERM $PID ; fi @@ +282,7 -250,30 @@ [ -n "$IPADDR" ] && /sbin/ifconfig $DEVICE down up ;; +'resume') + #logger RESUME EVENT PCMCIA SEEN FROM CARDMGR + if [ -z "$IPADDR" ] || is_true $DHCP ; then + if [ ! -x /sbin/dhcpcd ] && [ -x /sbin/udhcpc ] ; then + PID=`cat /var/run/udhcpc.$DEVICE.pid 2>/dev/null` + if [ -n "$PID" ] ; then + kill -USR1 $PID + fi + fi + fi + ;; + +'suspend') + #logger SUSPEND EVENT SEEN FROM CARDMGR +# ## uncomment this code below if you get problems where +# ## you are getting in IP conflict upon resume on DHCP networks +# if [ -z "$IPADDR" ] || is_true $DHCP ; then +# if [ ! -x /sbin/dhcpcd ] && [ -x /sbin/udhcpc ] ; then +# PID=`cat /var/run/udhcpc.$DEVICE.pid 2>/dev/null` +# if [ -n "$PID" ] ; then +# ifconfig $DEVICE 0.0.0.0 +# fi +# fi +# fi -'suspend'|'resume') ;; *)