Make the example action script less likely to result in failures

Use "=" instead of "==" and add an example statement between "then"
and "fi".
This commit is contained in:
Jouni Malinen 2011-04-13 19:55:34 +03:00 committed by Jouni Malinen
parent d4a747f006
commit be5b1e86a3

View file

@ -865,13 +865,14 @@ script:
IFNAME=$1 IFNAME=$1
CMD=$2 CMD=$2
if [ "$CMD" == "CONNECTED" ]; then if [ "$CMD" = "CONNECTED" ]; then
SSID=`wpa_cli -i$IFNAME status | grep ^ssid= | cut -f2- -d=` SSID=`wpa_cli -i$IFNAME status | grep ^ssid= | cut -f2- -d=`
# configure network, signal DHCP client, etc. # configure network, signal DHCP client, etc.
fi fi
if [ "$CMD" == "DISCONNECTED" ]; then if [ "$CMD" = "DISCONNECTED" ]; then
# remove network configuration, if needed # remove network configuration, if needed
SSID=
fi fi