From 15652edefb61bdf6ec2a8f04f7a23784ecbd3c5b Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Mon, 7 Apr 2008 14:33:51 -0700 Subject: Fix 3115: set protocols ospf default-information originate always" sends no "always" to the routing engine --- .../ospf/default-information/originate/node.def | 52 ++++++++++++---------- 1 file changed, 29 insertions(+), 23 deletions(-) (limited to 'templates/protocols') diff --git a/templates/protocols/ospf/default-information/originate/node.def b/templates/protocols/ospf/default-information/originate/node.def index 540b39bd..084d529e 100644 --- a/templates/protocols/ospf/default-information/originate/node.def +++ b/templates/protocols/ospf/default-information/originate/node.def @@ -1,24 +1,30 @@ help: Distribute a default route -delete:expression: "touch /tmp/ospf-default-info.$PPID" -end:expression: "\ - if [ -f \"/tmp/ospf-default-info.$PPID\" ]; then \ - ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"no default-information originate \"; \ - else \ - if [ -n \"$VAR(./always/@)\" ]; then \ - PARM=\"always\"; \ - fi; \ - if [ -n \"$VAR(./metric/@)\" ]; then \ - PARM=\"$PARM metric $VAR(./metric/@)\"; \ - fi; \ - if [ -n \"$VAR(./metric-type/@)\" ]; then \ - PARM=\"$PARM metric-type $VAR(./metric-type/@)\"; \ - fi; \ - if [ -n \"$VAR(./route-map/@)\" ]; then \ - PARM=\"$PARM route-map $VAR(./route-map/@)\"; \ - fi; \ - ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"default-information originate $PARM\"; \ - fi; " +delete: touch /tmp/ospf-default-info.$PPID +end: if [ -f "/tmp/ospf-default-info.$PPID" ]; then + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "no default-information originate"; + else + # uncomment and remove script pending bug 2525 + # + # if [ -n "$VAR(./always/)" ]; then + # PARM="always"; + # fi; + ${vyatta_sbindir}/vyatta-check-typeless-node.pl \ + "protocols ospf default-information originate always"; + if [ $? -eq 0 ] ; then + PARM="always"; + fi; + if [ -n "$VAR(./metric/@)" ]; then + PARM="$PARM metric $VAR(./metric/@)"; + fi; + if [ -n "$VAR(./metric-type/@)" ]; then + PARM="$PARM metric-type $VAR(./metric-type/@)"; + fi; + if [ -n "$VAR(./route-map/@)" ]; then + PARM="$PARM route-map $VAR(./route-map/@)"; + fi; + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "default-information originate $PARM"; + fi; -- cgit v1.2.3