Small improvement on the default gateway(s) detection
Change-Id: I98cc39bc909b63b57e366cbb787f655097dfe254
This commit is contained in:
parent
f353a65f55
commit
0a27ab493b
@ -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}..."
|
||||
|
Loading…
Reference in New Issue
Block a user