From e0405b10b3bd07f83c09847450e895baa30ffe4f Mon Sep 17 00:00:00 2001 From: Sylvain Pineau Date: Tue, 2 Jun 2015 10:22:55 +0200 Subject: providers:checkbox:bin:network_wait: Fix nmcli calls to comply with NM >= 0.9.10 --- bin/network_wait | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/network_wait b/bin/network_wait index 34e31fe..f0637d0 100755 --- a/bin/network_wait +++ b/bin/network_wait @@ -1,10 +1,15 @@ #!/bin/bash -set -e - x=1 while true; do - state=$(/usr/bin/nmcli -t -f STATE nm) + state=$(/usr/bin/nmcli -t -f STATE nm 2>/dev/null) + if [[ $? != 0 ]]; then + state=$(/usr/bin/nmcli -t -f STATE general 2>/dev/null) + rc=$? + if [[ $rc != 0 ]]; then + exit $rc + fi + fi if [ "$state" = "connected" ]; then echo $state exit 0 -- cgit v1.2.3