summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@uffda.(none)>2007-11-16 15:57:05 -0800
committerStig Thormodsrud <stig@uffda.(none)>2007-11-16 15:57:05 -0800
commit5318fb1b6189e564dd533ffc4857c8743b19deee (patch)
tree7df777695a157c13c85602a3fe65effc54221049
parent5fdd1cec7022a6106ef2c4381c426c85b3aa2db2 (diff)
downloadvyatta-cfg-quagga-5318fb1b6189e564dd533ffc4857c8743b19deee.tar.gz
vyatta-cfg-quagga-5318fb1b6189e564dd533ffc4857c8743b19deee.zip
Fix "set policy route-map set aggregator".
-rw-r--r--templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/node.def21
1 files changed, 8 insertions, 13 deletions
diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/node.def
index e32c3214..ac9eac8f 100644
--- a/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/node.def
+++ b/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/node.def
@@ -1,21 +1,16 @@
help: "BGP aggregator attribute"
+commit: $(./as/) != "" && $(./ip/) != ""; "Must configure both as and ip"
+commit: $(../../action/) != ""; "Must configure an action"
delete: "echo $(./as/@) $(./ip/@) > /tmp/policy-route-map-$(../../../@)-$(../../action/@)-$(../../@)-set-aggregator.\\$PPID"
-end: "if [ -z \"$(./as/)\" ] || [ -z \"$(./ip/)\" ]; then \
- echo You must configure as and ip ; \
- exit 1 ; \
- fi ; \
- if [ -f \"/tmp/policy-route-map-$(../../../@)-$(../../action/@)-$(../../@)-set-aggregator.\\$PPID\" ]; then \
+end: "if [ -f \"/tmp/policy-route-map-$(../../../@)-$(../../action/@)-$(../../@)-set-aggregator.\\$PPID\" ]; then \
as=\\$(cat /tmp/policy-route-map-$(../../../@)-$(../../action/@)-$(../../@)-set-aggregator.\\$PPID); \
- else \
- as=\"$(./as/@) $(./ip/@)\"; \
- fi ; \
- /usr/bin/vtysh -c \"configure terminal\" \
+ /usr/bin/vtysh -c \"configure terminal\" \
-c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \
-c \"no set aggregator as \\$as\" ; \
- if [ -f \"/tmp/policy-route-map-$(../../../@)-$(../../action/@)-$(../../@)-set-aggregator.\\$PPID\" ]; then \
rm -rf /tmp/policy-route-map-$(../../../@)-$(../../action/@)-$(../../@)-set-aggregator.\\$PPID; \
else \
+ as=\"$(./as/@) $(./ip/@)\"; \
/usr/bin/vtysh -c \"configure terminal\" \
- -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \
- -c \"set aggregator as \\$as\" ; \
- fi; "
+ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \
+ -c \"set aggregator as \\$as\" ; \
+ fi ; "