diff options
author | hagbard <vyosdev@derith.de> | 2019-03-25 11:54:35 -0700 |
---|---|---|
committer | hagbard <vyosdev@derith.de> | 2019-03-25 11:54:35 -0700 |
commit | ee730f459f1570a3ce5f5239cd33961e944dd3a3 (patch) | |
tree | 49ccbfc805e9ab7f06aa796bc5f6dd6af3b3a8f0 | |
parent | 67b10e6ff5f33d73c128508f00198cc3c04c13fc (diff) | |
download | vyatta-cfg-system-ee730f459f1570a3ce5f5239cd33961e944dd3a3.tar.gz vyatta-cfg-system-ee730f459f1570a3ce5f5239cd33961e944dd3a3.zip |
fixes: T1265 - Disabled Bonding Interfaces Enabled on Boot
-rw-r--r-- | templates/interfaces/bonding/node.def | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/templates/interfaces/bonding/node.def b/templates/interfaces/bonding/node.def index d87d5b98..1fa270b4 100644 --- a/templates/interfaces/bonding/node.def +++ b/templates/interfaces/bonding/node.def @@ -22,8 +22,14 @@ delete: SLAVES=`cat /sys/class/net/$VAR(@)/bonding/slaves`; exit 1; fi -end: if [ -f /tmp/bonding_$VAR(@).$PPID ] - then rm -f /tmp/bonding_$VAR(@).$PPID - sudo ip link set "$VAR(@)" up - /opt/vyatta/sbin/vyatta-link-detect $VAR(@) on - fi +end: `/bin/cli-shell-api exists interfaces bonding $VAR(@) disable` + if [ $? -ne 0 ] + then + if [ -f /tmp/bonding_$VAR(@).$PPID ] + then rm -f /tmp/bonding_$VAR(@).$PPID + sudo ip link set "$VAR(@)" up + /opt/vyatta/sbin/vyatta-link-detect $VAR(@) on + fi + else + sudo ip link set "$VAR(@)" down + fi |