slitaz-boot-scripts view etc/init.d/wpa_action.sh @ rev 396

network.sh: kinda we can now start and stop connections, as well to re-connect wlan <-> eth without stopping, as well to connect hidden network not knowing it's bssid.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Mar 25 00:29:33 2015 +0200 (2015-03-25)
parents 68435a9c0843
children 3fd5d62713f9
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