From ee730f459f1570a3ce5f5239cd33961e944dd3a3 Mon Sep 17 00:00:00 2001 From: hagbard Date: Mon, 25 Mar 2019 11:54:35 -0700 Subject: fixes: T1265 - Disabled Bonding Interfaces Enabled on Boot --- templates/interfaces/bonding/node.def | 16 +++++++++++----- 1 file 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 -- cgit v1.2.3