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

network.sh: stop wpa_cli interactive mode with static_ip
author Richard Dunbar <mojo@slitaz.org>
date Fri Oct 27 12:18:19 2017 -0400 (2017-10-27)
parents 6c2d6362887d
children
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