summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorEshenko Dmitriy <snooppy@mail.ua>2019-07-19 01:29:26 +0300
committerGitHub <noreply@github.com>2019-07-19 01:29:26 +0300
commitec407d330649e687da42edcca46b6ea544f65458 (patch)
treeeeb9bdda2c346b115436d3c3b1df0322a335e27e /templates
parent41c1291ee3e8bead09305ff120d8d28e4a21d030 (diff)
downloadvyatta-cfg-system-ec407d330649e687da42edcca46b6ea544f65458.tar.gz
vyatta-cfg-system-ec407d330649e687da42edcca46b6ea544f65458.zip
Fix T1491
Diffstat (limited to 'templates')
-rw-r--r--templates/interfaces/bonding/node.tag/primary/node.def3
1 files changed, 3 insertions, 0 deletions
diff --git a/templates/interfaces/bonding/node.tag/primary/node.def b/templates/interfaces/bonding/node.tag/primary/node.def
index f80c6b8f..f91b1d6c 100644
--- a/templates/interfaces/bonding/node.tag/primary/node.def
+++ b/templates/interfaces/bonding/node.tag/primary/node.def
@@ -3,5 +3,8 @@ priority: 320 # must be after ethernet bond-group
commit:expression: exec \
"grep -s $VAR(@) /sys/class/net/$VAR(../@)/bonding/slaves" \
; "Ethernet interface must be part of the bonding group"
+commit:expression: exec \
+ "grep -E '(^active-backup|balance-tlb|balance-alb)' /sys/class/net/$VAR(../@)/bonding/mode" \
+ ; "Bonding must have mode active-backup, transmit-load-balance or adaptive-load-balance"
update: sudo sh -c "echo $VAR(@) >/sys/class/net/$VAR(../@)/bonding/primary"
help: Primary device interface