diff options
-rw-r--r-- | jobs/suspend.txt.in | 72 | ||||
-rw-r--r-- | jobs/wireless.txt.in | 68 |
2 files changed, 105 insertions, 35 deletions
diff --git a/jobs/suspend.txt.in b/jobs/suspend.txt.in index 3d30133..eab6e7d 100644 --- a/jobs/suspend.txt.in +++ b/jobs/suspend.txt.in @@ -694,11 +694,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -723,11 +725,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -752,11 +756,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -781,11 +787,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -811,11 +819,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -841,11 +851,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -870,11 +882,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -899,11 +913,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -928,11 +944,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -957,11 +975,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -987,11 +1007,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -1017,11 +1039,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -1116,11 +1140,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -1154,11 +1180,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -1192,11 +1220,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -1230,11 +1260,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -1268,11 +1300,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -1306,11 +1340,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi diff --git a/jobs/wireless.txt.in b/jobs/wireless.txt.in index a619a4a..540c75d 100644 --- a/jobs/wireless.txt.in +++ b/jobs/wireless.txt.in @@ -63,11 +63,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -91,11 +93,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -119,11 +123,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -147,11 +153,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -176,11 +184,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -205,11 +215,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -233,11 +245,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -270,11 +284,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -308,11 +324,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -346,11 +364,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -384,11 +404,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -422,11 +444,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -459,11 +483,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link iperf -c $SERVER_IPERF -t 300 -i 30 + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -486,11 +512,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link iperf -c $SERVER_IPERF -t 300 -i 30 -u -b 100m -p 5050 + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -513,11 +541,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -541,11 +571,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi @@ -588,11 +620,13 @@ command: INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'` iw dev $INTERFACE link gateway_ping_test --interface=$INTERFACE + STATUS=$? # We reconnect the Ethernet connection if any (lp:1471663) - WIRED=$((nmcli -f CONNECTIONS dev list 2>&1 || nmcli -f CONNECTIONS dev show) | grep -oP "\S+(?= \| Wired)") + WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)") if [[ ! -z $WIRED ]]; then nmcli c up uuid $WIRED fi + exit $STATUS else exit 1 fi |