diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-05-14 18:54:06 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-07-03 16:08:52 +0200 |
commit | 7e4f4380ab51e201f7e710013d427e115dcd487e (patch) | |
tree | 6d80e49b0e496a4aff6729c14373ee41879e8e73 /utils | |
parent | a5bf4b74d57c6f2d27bf390a80f2cd3e7f3e7830 (diff) | |
download | external_libqmi-7e4f4380ab51e201f7e710013d427e115dcd487e.zip external_libqmi-7e4f4380ab51e201f7e710013d427e115dcd487e.tar.gz external_libqmi-7e4f4380ab51e201f7e710013d427e115dcd487e.tar.bz2 |
qmi-network: avoid double brackets on if statements
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/qmi-network | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/utils/qmi-network b/utils/qmi-network index 1b64a88..3cd9184 100755 --- a/utils/qmi-network +++ b/utils/qmi-network @@ -78,7 +78,7 @@ start_network () START_NETWORK_CMD="qmicli -d $DEVICE --wds-start-network $USE_PREVIOUS_CID --client-no-release-cid" echo "Starting network with '$START_NETWORK_CMD'..." - if [[ "x$QMIDEBUG" != "x" ]]; then + if [ "x$QMIDEBUG" != "x" ]; then START_NETWORK_OUT="\ [/dev/cdc-wdm0] Network started Packet data handle: '3634026241' @@ -92,7 +92,7 @@ start_network () # Save the new CID if we didn't use any before if [ "x$CID" = "x" ]; then CID=`echo "$START_NETWORK_OUT" | grep CID | sed "s/'//g" | awk 'BEGIN { FS = ":" } ; { print $2 }'` - if [[ "x$CID" = "x" ]]; then + if [ "x$CID" = "x" ]; then echo "error: network start failed, client not allocated" 1>&2 exit 1 else @@ -101,7 +101,7 @@ start_network () fi PDH=`echo "$START_NETWORK_OUT" | grep handle | sed "s/'//g" | awk 'BEGIN { FS = ":" } ; { print $2 }'` - if [[ "x$PDH" = "x" ]]; then + if [ "x$PDH" = "x" ]; then echo "error: network start failed, no packet data handle" 1>&2 # Cleanup the client qmicli -d "$DEVICE" --wds-noop --client-cid="$CID" @@ -127,7 +127,7 @@ stop_network () STOP_NETWORK_CMD="qmicli -d $DEVICE --wds-stop-network=$PDH --client-cid=$CID" echo "Stopping network with '$STOP_NETWORK_CMD'..." - if [[ "x$QMIDEBUG" != "x" ]]; then + if [ "x$QMIDEBUG" != "x" ]; then STOP_NETWORK_OUT="\ [/dev/cdc-wdm0] Network stopped " @@ -151,7 +151,7 @@ packet_service_status () STATUS_CMD="qmicli -d $DEVICE --wds-get-packet-service-status $USE_PREVIOUS_CID" echo "Getting status with '$STATUS_CMD'..." - if [[ "x$QMIDEBUG" != "x" ]]; then + if [ "x$QMIDEBUG" != "x" ]; then STATUS_OUT="\ [/dev/cdc-wdm0] Connection status: 'disconnected' " @@ -160,12 +160,12 @@ packet_service_status () fi CONN=`echo "$STATUS_OUT" | grep "Connection status" | sed "s/'//g" | awk 'BEGIN { FS = ":" } ; { print $2 }'` - if [[ "x$CONN" = "x" ]]; then + if [ "x$CONN" = "x" ]; then echo "error: couldn't get packet service status" 1>&2 exit 2 else echo "Status: $CONN" - if [[ "x$CONN" != "xconnected" ]]; then + if [ "x$CONN" != "xconnected" ]; then exit 64 fi fi |