settings de ethtool desactivados

This commit is contained in:
Sandino Araico Sanchez 2021-09-09 05:30:05 -05:00
parent a361a1c717
commit 6108b2799e

View file

@ -44,22 +44,22 @@ for VLAN in $VLANS ; do
echo "$VLAN_BOND not available" echo "$VLAN_BOND not available"
exit 23 exit 23
fi fi
MY_MODE=`cut -d ' ' -f 2 /sys/class/net/$VLAN_BOND/bonding/mode`
if [[ "$MY_MODE" != "$BOND_MODE" ]] ; then
echo $BOND_MODE \
> /sys/class/net/$VLAN_BOND/bonding/mode
sleep 2
fi
ip link set $VLAN_BOND up
[[ -n $MTU ]] && ip link set $VLAN_BOND mtu $MTU
#if [[ -n $SPEED ]] ; then
# ethtool -s $SLAVE_0 autoneg off speed $SPEED duplex full
# ethtool -s $SLAVE_1 autoneg off speed $SPEED duplex full
#fi
#sleep 5
ifenslave $VLAN_BOND $SLAVE_0 $SLAVE_1
sleep 5
fi fi
MY_MODE=`cut -d ' ' -f 2 /sys/class/net/$VLAN_BOND/bonding/mode`
if [[ "$MY_MODE" != "$BOND_MODE" ]] ; then
echo $BOND_MODE \
> /sys/class/net/$VLAN_BOND/bonding/mode
sleep 2
fi
ip link set $VLAN_BOND up
[[ -n $MTU ]] && ip link set $VLAN_BOND mtu $MTU
if [[ -n $SPEED ]] ; then
ethtool -s $SLAVE_0 autoneg off speed $SPEED duplex full
ethtool -s $SLAVE_1 autoneg off speed $SPEED duplex full
fi
sleep 5
ifenslave $VLAN_BOND $SLAVE_0 $SLAVE_1
sleep 5
if [[ $VLAN == $CTLPLANE ]] ; then if [[ $VLAN == $CTLPLANE ]] ; then
ip addr add $VLAN_IP/$MASK dev $VLAN_BOND ip addr add $VLAN_IP/$MASK dev $VLAN_BOND
GATEWAY=`cut -d ',' -f 8 <<< $VLAN_CONF` GATEWAY=`cut -d ',' -f 8 <<< $VLAN_CONF`