diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def | 2 | ||||
-rw-r--r-- | templates/interfaces/ethernet/node.tag/bridge-group/node.def | 3 |
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"; |