slitaz-boot-scripts diff etc/init.d/wpa_action.sh @ rev 188

Improve network.sh with wpa_cli; faster boot
author Rohit Joshi <jozee@slitaz.org>
date Mon Jan 04 16:44:56 2010 +0000 (2010-01-04)
parents
children 68435a9c0843
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/etc/init.d/wpa_action.sh	Mon Jan 04 16:44:56 2010 +0000
     1.3 @@ -0,0 +1,11 @@
     1.4 +#!/bin/sh
     1.5 +INTERFACE=$1
     1.6 + 
     1.7 +# For a dynamic IP with DHCP.
     1.8 +if [ "$2" = "CONNECTED" ]; then
     1.9 +     [ -f /var/run/udhcpc.$INTERFACE.pid] && killall udhcpc 
    1.10 +	/sbin/udhcpc -b -i $INTERFACE -p /var/run/udhcpc.$INTERFACE.pid
    1.11 +elif [ "$2" = "DISCONNECTED" ]; then
    1.12 +   	/sbin/udhcpc -b -i $INTERFACE -p /var/run/udhcpc.$INTERFACE.pid
    1.13 +fi
    1.14 +