summaryrefslogtreecommitdiff
path: root/templates/policy
diff options
context:
space:
mode:
authorMichael Larson <slioch@eng-140.vyatta.com>2008-02-20 13:36:00 -0800
committerMichael Larson <slioch@eng-140.vyatta.com>2008-02-20 13:36:00 -0800
commitc3cf64a0273fd728d07a1ab7dd3a3a421d2f23f1 (patch)
treee4c289e33099612892c271ceeaacacf4a68bf2c3 /templates/policy
parent582eded822fadc05a1b60656e8c9920399e6a7f9 (diff)
downloadvyatta-cfg-quagga-c3cf64a0273fd728d07a1ab7dd3a3a421d2f23f1.tar.gz
vyatta-cfg-quagga-c3cf64a0273fd728d07a1ab7dd3a3a421d2f23f1.zip
fix for bug 2541--requires saving temporary file, plus script to walk tree and redefined nodes. a bit of a
pain.
Diffstat (limited to 'templates/policy')
-rw-r--r--templates/policy/route-map/node.def1
-rw-r--r--templates/policy/route-map/node.tag/rule/node.def4
-rw-r--r--templates/policy/route-map/node.tag/rule/node.tag/action/node.def4
3 files changed, 7 insertions, 2 deletions
diff --git a/templates/policy/route-map/node.def b/templates/policy/route-map/node.def
index 0a7c2841..dfdc6494 100644
--- a/templates/policy/route-map/node.def
+++ b/templates/policy/route-map/node.def
@@ -2,4 +2,3 @@ tag:
type: txt
help: Create route-map or enter route-map command mode
syntax:expression: pattern $VAR(@) "^[-a-zA-Z0-9.]+$" ; "route-map $VAR(@): name must be alpha-numeric"
-delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -n -c \"configure terminal\" -c \"no route-map $VAR(@)\" "
diff --git a/templates/policy/route-map/node.tag/rule/node.def b/templates/policy/route-map/node.tag/rule/node.def
index ccfad3ad..c3079f54 100644
--- a/templates/policy/route-map/node.tag/rule/node.def
+++ b/templates/policy/route-map/node.tag/rule/node.def
@@ -2,3 +2,7 @@ tag:
type: u32
help: Specify route-map rule number
syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "route-map $VAR(../@): rule number $VAR(@) must be between 1 and 65535"
+end:expression: "if [ -f /tmp/delete-policy-route-map-$VAR(../@)-rule-$VAR(@) ]; then \
+ ${vyatta_sbindir}/vyatta-policy-action-verify.pl $VAR(../@) $VAR(@) $( cat /tmp/delete-policy-route-map-$VAR(../@)-rule-$VAR(@) ); \
+ fi"
+
diff --git a/templates/policy/route-map/node.tag/rule/node.tag/action/node.def b/templates/policy/route-map/node.tag/rule/node.tag/action/node.def
index e06322dd..83e092e8 100644
--- a/templates/policy/route-map/node.tag/rule/node.tag/action/node.def
+++ b/templates/policy/route-map/node.tag/rule/node.tag/action/node.def
@@ -2,4 +2,6 @@ type: txt
help: Action to take on prefixes matching this rule
syntax:expression: $VAR(@) in "permit", "deny"; "route-map $VAR(../../@) $VAR(@) $VAR(../@) action: must be permit or deny"
update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"route-map $VAR(../../@) $VAR(@) $VAR(../@)\" "
-delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"no route-map $VAR(../../@) $VAR(@) $VAR(../@)\" "
+update:expression: exec "sudo rm -f /tmp/delete-policy-route-map-$VAR(../../@)-rule-$VAR(../@) 2>/dev/null"
+delete:expression: exec "sudo echo $VAR(@) > /tmp/delete-policy-route-map-$VAR(../../@)-rule-$VAR(../@)"
+