summaryrefslogtreecommitdiff
path: root/templates/policy
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-12-26 07:34:23 +0100
committerDaniil Baturin <daniil@baturin.org>2018-12-26 07:34:23 +0100
commit49c5431359719c7949dd82515b3c321600434292 (patch)
treed67910ed6c37f70cbb4e99440c7de4b312dcfad5 /templates/policy
parent206f85c4426821033f5a31fd22c5b8b0cab9e06d (diff)
downloadvyatta-cfg-quagga-49c5431359719c7949dd82515b3c321600434292.tar.gz
vyatta-cfg-quagga-49c5431359719c7949dd82515b3c321600434292.zip
T1122: move the misplaced check to where it belonds to allow deleting "set comm-list" statements.
Diffstat (limited to 'templates/policy')
-rw-r--r--templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def11
1 files changed, 7 insertions, 4 deletions
diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def
index 9ae67bc2..2438ee51 100644
--- a/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def
+++ b/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def
@@ -1,15 +1,18 @@
help: Border Gateway Protocol (BGP) communities matching a community-list
delete: touch /tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-comm-list.$PPID
-end: if [ -z "$VAR(./comm-list/)" ]; then
- echo You must configure a comm-list ;
- exit 1 ;
- fi ;
+end:
vtysh --noerror -c "configure terminal" \
-c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \
-c "no set comm-list " ;
if [ -f "/tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-comm-list.$PPID" ]; then
rm -rf /tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-comm-list.$PPID;
else
+ if [ -z "$VAR(./comm-list/)" ]; then
+ echo You must configure a comm-list ;
+ exit 1 ;
+ fi ;
+
+
# uncomment this when 2525 is fixed and comment out the subsequent call
#if [ -n "$VAR(./delete/)" ]; then
# cond="delete" ;