diff options
author | Daniil Baturin <daniil@baturin.org> | 2018-12-26 07:34:23 +0100 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2018-12-26 07:44:05 +0100 |
commit | 77813273feae5d5635d3f4da4c03066a78a11a02 (patch) | |
tree | 47dd47a324d3c2750b8ed74aec3768f3558b6c1a | |
parent | 09135d9e780588a61d101efc01300659a9cd665e (diff) | |
download | vyatta-cfg-quagga-77813273feae5d5635d3f4da4c03066a78a11a02.tar.gz vyatta-cfg-quagga-77813273feae5d5635d3f4da4c03066a78a11a02.zip |
T1122: move the misplaced check to where it belonds to allow deleting "set comm-list" statements.
-rw-r--r-- | templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def | 11 |
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" ; |