summaryrefslogtreecommitdiff
path: root/templates/interfaces/bridge/node.def
blob: 343cf984fc2d00e0d84296f2a4a84d84c5f7f5b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
tag:
priority: 310
type: txt
help: Set bridge interface name
comp_help: "Enter bridge interface name (br0 - br999)"

syntax:expression: pattern $VAR(@) "^br[0-9]+$" ; "Must be (br0 - br999)"

create: sudo brctl addbr $VAR(@)
        sudo ip link set $VAR(@) up

delete: if ! /opt/vyatta/sbin/vyatta-bridgegroup-depedency.pl   \
          --no-interfaces-assigned                            	\
          --bridge-interface="$VAR(@)"; then                    \
          exit 1
        fi
        sudo ip link set $VAR(@) down;
        sudo brctl delbr $VAR(@);