From b4601cd3d0b27e5810ac01000a09d367b3410db4 Mon Sep 17 00:00:00 2001 From: Sandino Araico Sanchez Date: Tue, 7 Sep 2021 06:25:53 -0500 Subject: [PATCH] setup-netdev con default gateway --- scripts/setup-netdev | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/setup-netdev b/scripts/setup-netdev index e67ebb0..0a00f43 100755 --- a/scripts/setup-netdev +++ b/scripts/setup-netdev @@ -62,6 +62,9 @@ for VLAN in 110 218 222 226 306 321 480 ; do sleep 5 if [[ $BOND_MODE == 1 ]] ; then ip addr add $VLAN_IP/$MASK dev $VLAN_BOND + if [[ -n $GATEWAY ]] ; then + ip route add default via $GATEWAY + fi else ip link add link $VLAN_BOND \ name $VLAN_BOND.$VLAN \ @@ -69,9 +72,6 @@ for VLAN in 110 218 222 226 306 321 480 ; do ip link set $VLAN_BOND.$VLAN up ip addr add $VLAN_IP/$MASK dev $VLAN_BOND.$VLAN fi - if [[ -n $GATEWAY ]] ; then - ip route add default via $GATEWAY - fi done systemctl restart sshd