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:
parent
d4a747f006
commit
be5b1e86a3
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue