diff options
-rw-r--r-- | templates/interfaces/bonding/node.tag/primary/node.def | 3 |
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..98a18a48 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 |