fix udhcpc restarting on suspend/resume. Patch courtesy Hrw. Pending: fix restarting...
authorMichael Lauer <mickey@vanille-media.de>
Sat, 16 Oct 2004 18:10:08 +0000 (18:10 +0000)
committerMichael Lauer <mickey@vanille-media.de>
Sat, 16 Oct 2004 18:10:08 +0000 (18:10 +0000)
BKrev: 417164009t4p5SLFlmW_84ESXXS9Ew

pcmcia-cs/pcmcia-cs-3.2.8/network.patch
pcmcia-cs/pcmcia-cs_3.2.8.oe

index e69de29..fb808e2 100644 (file)
@@ -0,0 +1,92 @@
+--- 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')
+     ;;
+ *)
index b5b67ca..7b95f88 100644 (file)
@@ -3,7 +3,7 @@ SECTION = "base"
 PRIORITY = "required"
 LICENSE = "GPL"
 DEPENDS = "virtual/kernel"
-PR = "r5"
+PR = "r7"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/pcmcia-cs/pcmcia-cs-${PV}.tar.gz \
           file://busybox.patch;patch=1 \