Author: titmuss
Date: Thu Feb 14 15:06:57 2008
New Revision: 1965

URL: http://svn.slimdevices.com?rev=1965&root=Jive&view=rev
Log:
 [EMAIL PROTECTED] (orig r1963):  titmuss | 2008-02-14 23:01:28 +0000
 Bug: 7129
 Description:
 Make sure the dhcp client is stopped before calling ifconfig. Dhcp was 
sometimes 
 bringing the interface back up, and this prevented the wlan modules from being 
 removed.
 
 

Modified:
    trunk/   (props changed)
    trunk/squeezeboxJive/src/system/filesystem/etc/init.d/wlan

Propchange: trunk/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Thu Feb 14 15:06:57 2008
@@ -1,3 +1,3 @@
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:1962
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:1963
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378

Modified: trunk/squeezeboxJive/src/system/filesystem/etc/init.d/wlan
URL: 
http://svn.slimdevices.com/trunk/squeezeboxJive/src/system/filesystem/etc/init.d/wlan?rev=1965&root=Jive&r1=1964&r2=1965&view=diff
==============================================================================
--- trunk/squeezeboxJive/src/system/filesystem/etc/init.d/wlan (original)
+++ trunk/squeezeboxJive/src/system/filesystem/etc/init.d/wlan Thu Feb 14 
15:06:57 2008
@@ -47,16 +47,25 @@
        # Stop wpa supplicant
        killall wpa_cli
        killall wpa_supplicant
-
-       # Down the interface
-       ifconfig eth0 down
-       /bin/rm -rf /var/run/ifstate
-
+       
        # Make sure udhcpc is killed
        if [ -r /var/run/udhcpc.eth0.pid ]
        then
-               kill -TERM `cat /var/run/udhcpc.eth0.pid`
+           PID=`cat /var/run/udhcpc.eth0.pid`
+           kill -TERM $PID
+           
+           # Wait until udhcpc is dead
+           kill -0 $PID >/dev/null 2>&1
+           while [ $? == 0 ]; do
+               sleep 1
+               kill -0 $PID >/dev/null 2>&1
+           done
        fi
+       
+       echo "Taking down eth0..."
+       ifconfig eth0 down
+
+       /bin/rm -rf /var/run/ifstate
 
        # Remove wlan drivers
        rmmod gspi8xxx gspi

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins

Reply via email to