From a6ead18568860f4a574325198ecfe188c69eda28 Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Mon, 2 Nov 2009 18:29:47 -0800 Subject: Fix 5063: committing "set interfaces ethernet <> bridge-group bridge <>" got "invalid variable reference (invalid format)" - need extra escape magic to call vyatta-cli-expand-var.pl. --- templates/interfaces/ethernet/node.tag/bond-group/node.def | 2 +- templates/interfaces/ethernet/node.tag/bridge-group/node.def | 2 +- .../interfaces/ethernet/node.tag/vif/node.tag/bridge-group/node.def | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'templates/interfaces') diff --git a/templates/interfaces/ethernet/node.tag/bond-group/node.def b/templates/interfaces/ethernet/node.tag/bond-group/node.def index 7b6df036..c173ae3f 100644 --- a/templates/interfaces/ethernet/node.tag/bond-group/node.def +++ b/templates/interfaces/ethernet/node.tag/bond-group/node.def @@ -6,7 +6,7 @@ commit:expression: exec \ allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show=bonding -update: OLDG=`${vyatta_sbindir}/vyatta-cli-expand-var.pl \$\(/interfaces/ethernet/$VAR(../@)/bond-group/@\)` +update: OLDG=`${vyatta_sbindir}/vyatta-cli-expand-var.pl \\$VAR\(/interfaces/ethernet/$VAR(../@)/bond-group/@\)` if [ -n "$OLDG" ]; then sudo ${vyatta_sbindir}/vyatta-bonding.pl --dev=$OLDG --remove=$VAR(../@) fi diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/node.def index 5ea9da19..b30a9e10 100644 --- a/templates/interfaces/ethernet/node.tag/bridge-group/node.def +++ b/templates/interfaces/ethernet/node.tag/bridge-group/node.def @@ -2,7 +2,7 @@ help: Add this interface to a bridge group end: ethif=$VAR(../@) - oldbridge=`/opt/vyatta/sbin/vyatta-cli-expand-var.pl \$\(/interfaces/ethernet/$ethif/bridge-group/bridge/@\)` + oldbridge=`/opt/vyatta/sbin/vyatta-cli-expand-var.pl \\$VAR\(/interfaces/ethernet/$ethif/bridge-group/bridge/@\)` newbridge="$VAR(./bridge/@)" if [ ${COMMIT_ACTION} = 'SET' ]; then diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/node.def index 0bade03a..e3645b1c 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/node.def @@ -5,7 +5,7 @@ end: eth=$VAR(../../@) vif=$VAR(../@) ethif=$eth.$vif - oldbridge=`/opt/vyatta/sbin/vyatta-cli-expand-var.pl \$\(/interfaces/ethernet/$eth/vif/$vif/bridge-group/bridge/@\)` + oldbridge=`/opt/vyatta/sbin/vyatta-cli-expand-var.pl \\$VAR\(/interfaces/ethernet/$eth/vif/$vif/bridge-group/bridge/@\)` newbridge="$VAR(./bridge/@)" if [ ${COMMIT_ACTION} = 'SET' ]; then -- cgit v1.2.3