From 465c7ca1f843763d85ce715019c453dcf22ebd9e Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Fri, 27 Feb 2009 18:12:49 -0800 Subject: fix logic and shell syntax --- templates/interfaces/bridge/node.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'templates') diff --git a/templates/interfaces/bridge/node.def b/templates/interfaces/bridge/node.def index cbf5e9cc..2b0eb34c 100644 --- a/templates/interfaces/bridge/node.def +++ b/templates/interfaces/bridge/node.def @@ -6,7 +6,7 @@ syntax:expression: pattern $VAR(@) "^br[0-9]+$" ; "Must be (br0 - br999)" create: sudo brctl addbr $VAR(@) -delete: if [ -z `ls /sys/class/net/$VAR(@)/brif` ]; then +delete: if [ -n "`ls /sys/class/net/$VAR(@)/brif`" ]; then echo "Interfaces are still assigned to bridge $VAR(@)"; exit 1; fi; -- cgit v1.2.3 From 92bf151c588e3963c658863daa2db3415426cdfb Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Fri, 27 Feb 2009 18:35:56 -0800 Subject: up the bridge interface when it's created --- templates/interfaces/bridge/node.def | 1 + 1 file changed, 1 insertion(+) (limited to 'templates') diff --git a/templates/interfaces/bridge/node.def b/templates/interfaces/bridge/node.def index 2b0eb34c..e70c9041 100644 --- a/templates/interfaces/bridge/node.def +++ b/templates/interfaces/bridge/node.def @@ -5,6 +5,7 @@ help: Set bridge interface syntax:expression: pattern $VAR(@) "^br[0-9]+$" ; "Must be (br0 - br999)" create: sudo brctl addbr $VAR(@) + sudo ip link set $VAR(@) up delete: if [ -n "`ls /sys/class/net/$VAR(@)/brif`" ]; then echo "Interfaces are still assigned to bridge $VAR(@)"; -- cgit v1.2.3