summaryrefslogtreecommitdiff
path: root/templates/interfaces/bridge/node.def
blob: b59ba7b2801b1cef4bd16ab5022d0c0cc60d2ee5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
tag:
type: txt
help: Set bridge interface
syntax:expression: $VAR(@) in "br0", "br1", "br2", "br3", "br4", "br5", "br6", "br7", "br8", "br9" ; "Must be (br0 - br9)"

create: sudo brctl addbr $VAR(@)

delete: if [ -n "`/usr/sbin/brctl show | grep $VAR(@) | grep eth`" ]; then
	   echo "Interfaces are still assigned to bridge $VAR(@)";
           exit 1;           
        fi;
        sudo ip link set $VAR(@) down;
        sudo brctl delbr $VAR(@);

comp_help: "Enter bridge interface name (br0 - br9)"