summaryrefslogtreecommitdiff
path: root/templates/protocols
diff options
context:
space:
mode:
authorRobert Bays <rbays@moresby.vyatta.com>2008-03-14 13:18:28 -0700
committerRobert Bays <rbays@moresby.vyatta.com>2008-03-14 13:18:28 -0700
commite1d0d9a781e5ccf7941809e8e75e607b2e9197c9 (patch)
tree2ca39d34bb4d249fa1e6751bb25f27d28c910b2b /templates/protocols
parentd8fd1b99cac5302f42bf6e7fbea86e3be634b27d (diff)
downloadvyatta-cfg-quagga-e1d0d9a781e5ccf7941809e8e75e607b2e9197c9.tar.gz
vyatta-cfg-quagga-e1d0d9a781e5ccf7941809e8e75e607b2e9197c9.zip
fix for bugs 2725 and 2999
Diffstat (limited to 'templates/protocols')
-rw-r--r--templates/protocols/bgp/node.tag/network/node.def50
-rw-r--r--templates/protocols/bgp/node.tag/network/node.tag/backdoor/node.def (renamed from templates/protocols/bgp/node.tag/network/node.tag/.backdoor/node.def)0
2 files changed, 25 insertions, 25 deletions
diff --git a/templates/protocols/bgp/node.tag/network/node.def b/templates/protocols/bgp/node.tag/network/node.def
index acd2475b..c6061749 100644
--- a/templates/protocols/bgp/node.tag/network/node.def
+++ b/templates/protocols/bgp/node.tag/network/node.def
@@ -1,31 +1,31 @@
tag:
type: ipv4net
help: Specify a network to announce via BGP
-syntax:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-prefix-boundry $VAR(@)"
+syntax:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-prefix-boundry $VAR(@)";
+ "Prefix doesn't fall on a natural boundry"
-commit:expression: !($VAR(./backdoor/) != "" && $VAR(./route-map/) != ""); \
- "May specify route-map or backdoor but not both"
+commit:expression: !($VAR(./backdoor/) != "" && $VAR(./route-map/) != "");
+ "May specify route-map or backdoor but not both"
-delete:expression: "touch /tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID"
+delete: touch /tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID
-end:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr \
- -c \"configure terminal\" \
- -c \"router bgp $VAR(../@)\" \
- -c \"no network $VAR(@)\"; \
- if [ -f \"/tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID\" ]; then \
- rm -rf /tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID; \
- else \
-#
-# Commenting out until cli bug 2525 is fixed
-#
-# if [ -n \"$VAR(./backdoor/)\" ]; then
-# COND=\"backdoor\";
-# fi;
- if [ -n \"$VAR(./route-map/@)\" ]; then \
- COND=\"route-map $VAR(./route-map/@)\"; \
- fi; \
- ${vyatta_sbindir}/vyatta-vtysh.pl \
- -c \"configure terminal\" \
- -c \"router bgp $VAR(../@)\" \
- -c \"network $VAR(@) $COND\"; \
- fi; "
+end: ${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c "configure terminal" -c "router bgp $VAR(../@)" -c "no network $VAR(@)";
+
+ if [ -f "/tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID" ]; then
+ rm -rf /tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID;
+ else
+ # uncomment and replace the call to vyatta-check-typeless-node.pl pending bug 2525
+ #if [ -n \"$VAR(./backdoor/)\" ]; then
+ # COND=\"backdoor\";
+ #fi;
+ ${vyatta_sbindir}/vyatta-check-typeless-node.pl "protocols bgp $VAR(../@) network $VAR(@) backdoor";
+ if [ $? -eq 0 ]; then
+ cond="backdoor ";
+ fi ;
+
+ if [ -n "$VAR(./route-map/@)" ]; then
+ COND="route-map $VAR(./route-map/@)";
+ fi;
+
+ ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" -c "router bgp $VAR(../@)" -c "network $VAR(@) $cond";
+ fi;
diff --git a/templates/protocols/bgp/node.tag/network/node.tag/.backdoor/node.def b/templates/protocols/bgp/node.tag/network/node.tag/backdoor/node.def
index b7dc6950..b7dc6950 100644
--- a/templates/protocols/bgp/node.tag/network/node.tag/.backdoor/node.def
+++ b/templates/protocols/bgp/node.tag/network/node.tag/backdoor/node.def