summaryrefslogtreecommitdiff
path: root/templates/interfaces
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2008-04-17 14:44:09 -0700
committerStig Thormodsrud <stig@vyatta.com>2008-04-17 14:44:09 -0700
commit69ce2e654600704c520d77dd30c42b9e4aee8f47 (patch)
tree941f0be3979330ecfcec120b7adc1043749f5c8e /templates/interfaces
parent1eab36819cfeedd7c1f80a1aeae216baba9845e9 (diff)
downloadvyatta-cfg-system-69ce2e654600704c520d77dd30c42b9e4aee8f47.tar.gz
vyatta-cfg-system-69ce2e654600704c520d77dd30c42b9e4aee8f47.zip
Fix 3148: can't delete bridge interface
Diffstat (limited to 'templates/interfaces')
-rw-r--r--templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def2
-rw-r--r--templates/interfaces/ethernet/node.tag/bridge-group/node.def3
2 files changed, 4 insertions, 1 deletions
diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def
index 72b3273f..79609a86 100644
--- a/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def
+++ b/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def
@@ -5,7 +5,7 @@ syntax:expression: exec " \
echo bridge interface $VAR(@) doesn\\'t exist on this system ; \
exit 1 ; \
fi ; "
-delete:expression: "sudo brctl delif $VAR(@) $VAR(../../@)"
+delete: echo $VAR(@) > /tmp/bridge-no.$PPID
allowed: local -a array ;
array=( /sys/class/net/br* ) ;
echo -n ${array[@]##*/}
diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/node.def
index 0f4e9b2c..9309f683 100644
--- a/templates/interfaces/ethernet/node.tag/bridge-group/node.def
+++ b/templates/interfaces/ethernet/node.tag/bridge-group/node.def
@@ -6,6 +6,9 @@ delete: touch /tmp/eth-$VAR(../@)-bridge.$PPID;
end: if [ -f "/tmp/eth-$VAR(../@)-bridge.$PPID" ]; then
rm -f /tmp/eth-$VAR(../@)-bridge.$PPID;
+ brno=$(cat /tmp/bridge-no.$PPID);
+ sudo brctl delif $brno $VAR(../@);
+ rm -f /tmp/bridge-no.$PPID;
else
if [ -z "$VAR(./bridge/@)" ]; then
echo "Must set the bridge interface";