slitaz-boot-scripts view 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 source
1 #!/bin/sh
2 INTERFACE=$1
4 # For a dynamic IP with DHCP.
5 if [ "$2" = "CONNECTED" ]; then
6 [ -f /var/run/udhcpc.$INTERFACE.pid] && killall udhcpc
7 /sbin/udhcpc -b -i $INTERFACE -p /var/run/udhcpc.$INTERFACE.pid
8 elif [ "$2" = "DISCONNECTED" ]; then
9 /sbin/udhcpc -b -i $INTERFACE -p /var/run/udhcpc.$INTERFACE.pid
10 fi