summaryrefslogtreecommitdiff
path: root/templates/interfaces
diff options
context:
space:
mode:
authorMark O'Brien <mark@vyatta.com>2009-06-23 17:56:53 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2009-07-17 14:56:04 -0700
commit519a2a9b7045e55b3da0080a15d027a5de79c613 (patch)
treefeac987eaff2307e25073451f42ade47e5dd8836 /templates/interfaces
parentb9c4028829be7cee545e1eb4321d74846904d558 (diff)
downloadvyatta-cfg-system-519a2a9b7045e55b3da0080a15d027a5de79c613.tar.gz
vyatta-cfg-system-519a2a9b7045e55b3da0080a15d027a5de79c613.zip
Change interface state to down, add to bond group, change state to up.
(cherry picked from commit ed127b43756dfe852cff453ac8d8a72c01cbefd2)
Diffstat (limited to 'templates/interfaces')
-rw-r--r--templates/interfaces/ethernet/node.tag/bond-group/node.def6
1 files changed, 5 insertions, 1 deletions
diff --git a/templates/interfaces/ethernet/node.tag/bond-group/node.def b/templates/interfaces/ethernet/node.tag/bond-group/node.def
index ee9e283f..4c5c38c3 100644
--- a/templates/interfaces/ethernet/node.tag/bond-group/node.def
+++ b/templates/interfaces/ethernet/node.tag/bond-group/node.def
@@ -3,5 +3,9 @@ help: Add this interface to a bonding group
commit:expression: exec \
"/opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(@) --check=bonding"
allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=bonding
-create: sudo sh -c "echo +$VAR(../@) > /sys/class/net/$VAR(@)/bonding/slaves"
+create: sudo sh -c "ip link set $VAR(../@) down 2>/dev/null";
+ sudo sh -c "echo +$VAR(../@) > /sys/class/net/$VAR(@)/bonding/slaves";
+ sudo sh -c "ip link set $VAR(../@) up 2>/dev/null"
+
delete: sudo sh -c "echo -$VAR(../@) > /sys/class/net/$VAR(@)/bonding/slaves"
+