From 0a27ab493b175157ce737361114bcac573c7a830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Jeanneret?= Date: Tue, 12 May 2020 10:31:46 +0200 Subject: [PATCH] Small improvement on the default gateway(s) detection Change-Id: I98cc39bc909b63b57e366cbb787f655097dfe254 --- validation-scripts/all-nodes.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validation-scripts/all-nodes.sh b/validation-scripts/all-nodes.sh index 1918bd8832..cbfa05343e 100755 --- a/validation-scripts/all-nodes.sh +++ b/validation-scripts/all-nodes.sh @@ -59,7 +59,7 @@ function ping_controller_ips() { # all of them should some manual network config have # multiple gateways. function ping_default_gateways() { - DEFAULT_GW=$(ip r | grep ^default | cut -d " " -f 3) + DEFAULT_GW=$(ip ro | awk '/^default/ {print $3}') set +e for GW in $DEFAULT_GW; do echo -n "Trying to ping default gateway ${GW}..."