summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.def2
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/send/node.def19
2 files changed, 10 insertions, 11 deletions
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.def b/templates/protocols/bgp/node.tag/neighbor/node.def
index c9001078..8e464dba 100644
--- a/templates/protocols/bgp/node.tag/neighbor/node.def
+++ b/templates/protocols/bgp/node.tag/neighbor/node.def
@@ -16,7 +16,7 @@ create: if /opt/vyatta/sbin/vyatta-bgp.pl --check-if-peer-group \
fi;
delete: /opt/vyatta/sbin/vyatta-bgp.pl --check-peer-groups \
- --peergroup $VAR(@) --as $VAR(../@);
+ --peergroup $VAR(@) --as $VAR(../@) || exit 1
vyatta-vtysh -c "configure terminal" \
-c "router bgp $VAR(../@)" \
-c "no neighbor $VAR(@)"
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/send/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/send/node.def
index 73f1768f..8edd77c8 100644
--- a/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/send/node.def
+++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/send/node.def
@@ -1,14 +1,13 @@
help: Set capability to send the ORF
commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)"
commit:expression: $VAR(../../../../peer-group/) == ""; "You can't set capability orf send for neighbor $VAR(../../../../@) in peer-group $VAR(../../../../peer-group/@)"
-update:expression: "if [ -n \"$VAR(../../../../remote-as/@)\" ]; then \
- peer=\"remote-as $VAR(../../../../remote-as/@)\"; \
- else \
- peer=\"peer-group $VAR(../../../../peer-group/@)\"; \
- fi; \
- vyatta-vtysh -c \"configure terminal\" -c \"router bgp $VAR(../../../../../@)\" \
- -c \"neighbor $VAR(../../../../@) $peer\" \
- -c \"neighbor $VAR(../../../../@) capability orf prefix-list send\" "
-delete:expression: "vyatta-vtysh --noerror -c \"configure terminal\" -c \"router bgp $VAR(../../../../../@)\" \
- -c \"no neighbor $VAR(../../../../@) capability orf prefix-list send\" "
+update: if [ -n "$VAR(../../../../remote-as/@)" ]
+ then peer="remote-as $VAR(../../../../remote-as/@)"
+ else peer="peer-group $VAR(../../../../peer-group/@)"
+ fi
+ vyatta-vtysh -c "configure terminal" -c "router bgp $VAR(../../../../../@)" \
+ -c "neighbor $VAR(../../../../@) $peer" \
+ -c "neighbor $VAR(../../../../@) capability orf prefix-list send" "
+delete: vyatta-vtysh --noerror -c "configure terminal" -c "router bgp $VAR(../../../../../@)" \
+ -c "no neighbor $VAR(../../../../@) capability orf prefix-list send" "