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
|
||||
CMD=$2
|
||||
|
||||
if [ "$CMD" == "CONNECTED" ]; then
|
||||
if [ "$CMD" = "CONNECTED" ]; then
|
||||
SSID=`wpa_cli -i$IFNAME status | grep ^ssid= | cut -f2- -d=`
|
||||
# configure network, signal DHCP client, etc.
|
||||
fi
|
||||
|
||||
if [ "$CMD" == "DISCONNECTED" ]; then
|
||||
if [ "$CMD" = "DISCONNECTED" ]; then
|
||||
# remove network configuration, if needed
|
||||
SSID=
|
||||
fi
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue