]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/pcmcia-cs/pcmcia-cs-3.2.8/network.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / pcmcia-cs / pcmcia-cs-3.2.8 / network.patch
1 --- pcmcia-cs/etc/network.old   2004-07-01 00:31:59.000000000 +0100
2 +++ pcmcia-cs/etc/network       2004-07-01 00:32:57.000000000 +0100
3 @@ -31,16 +31,39 @@
4  
5  RESOLV=/etc/resolv.conf
6  
7 +# if this interface has an entry in /etc/network/interfaces, let ifupdown
8 +# handle it
9 +if grep -q "iface \+$DEVICE" /etc/network/interfaces; then
10 +  case $ACTION in
11 +    start)
12 +       ifup $DEVICE
13 +       ;;
14 +    stop)
15 +       ifdown $DEVICE
16 +       ;;
17 +    restart)
18 +       ifdown $DEVICE
19 +       ifup $DEVICE
20 +       ;;
21 +  esac
22 +  
23 +  exit 0
24 +fi
25 +
26 +## see if it is a wireless card. Jamey and AntiProxy
27 +CHECK_WIRELESS=`grep "$DEVICE" /proc/net/wireless`
28 +if [ -n "$CHECK_WIRELESS" ] ; then
29  # Now, run the specific script for Wireless LAN interfaces
30  # Note : we need the wireless parameters to be set up before IP parameters,
31  # so that we can perform DHCP over the Wireless link if needed. Jean II
32 -O_INFO=$INFO ; INFO=
33 -if [ -x ./wireless ] ; then
34 -    . ./wireless
35 -else
36 -    . /etc/pcmcia/wireless
37 +    O_INFO=$INFO ; INFO=
38 +    if [ -x ./wireless ] ; then
39 +       . ./wireless
40 +    else
41 +       . /etc/pcmcia/wireless
42 +    fi
43 +    INFO=$O_INFO
44  fi
45 -INFO=$O_INFO
46  
47  bootp_setup ()
48  {
49 @@ +225,6 -188,11 @@
50                 fi
51                 /sbin/dhcpcd -XYZZY 2>&1 | grep -q DHCP || \
52                     rm -f /var/run/dhcpcd-$DEVICE.pid
53 +           # modified for udhcpc
54 +           elif [ -x /sbin/udhcpc ] ; then
55 +               PID=`cat /var/run/udhcpc.$DEVICE.pid 2>/dev/null`
56 +               if [ -n "$PID" ] ; then kill -TERM $PID ; fi
57 +           # end of modification
58             elif [ -x /sbin/dhclient ] ; then
59                 PID=`cat /var/run/dhclient.pid 2>/dev/null`
60                 if [ -n "$PID" ] ; then kill -TERM $PID ; fi
61 @@ +282,7 -250,30 @@
62      [ -n "$IPADDR" ] && /sbin/ifconfig $DEVICE down up
63      ;;
64  
65 +'resume')
66 +    #logger RESUME EVENT PCMCIA SEEN FROM CARDMGR
67 +    if [ -z "$IPADDR" ] || is_true $DHCP ; then
68 +        if [ ! -x /sbin/dhcpcd ] && [ -x /sbin/udhcpc ] ; then
69 +              PID=`cat /var/run/udhcpc.$DEVICE.pid 2>/dev/null`
70 +              if [ -n "$PID" ] ; then
71 +                 kill -USR1 $PID
72 +              fi
73 +        fi
74 +    fi
75 +    ;;
76 +    
77 +'suspend')
78 +    #logger SUSPEND EVENT SEEN FROM CARDMGR
79 +# ## uncomment this code below if you get problems where
80 +# ## you are getting in IP conflict upon resume on DHCP networks
81 +#    if [ -z "$IPADDR" ] || is_true $DHCP ; then
82 +#        if [ ! -x /sbin/dhcpcd ] && [ -x /sbin/udhcpc ] ; then
83 +#            PID=`cat /var/run/udhcpc.$DEVICE.pid 2>/dev/null`
84 +#                    if [ -n "$PID" ] ; then
85 +#                 ifconfig $DEVICE 0.0.0.0
86 +#              fi
87 +#        fi
88 +#    fi
89 -'suspend'|'resume')
90      ;;
91  
92  *)