diff options
author | rbalocca <rbalocca@vyatta.com> | 2008-04-09 12:04:39 -0700 |
---|---|---|
committer | rbalocca <rbalocca@vyatta.com> | 2008-04-09 12:04:39 -0700 |
commit | c9b4583f38f4bc7fedef6f05d31ef7ea2020473a (patch) | |
tree | 90e329b103b904144fef2f1eea2e6cb620ab215c /templates/protocols/ospf/default-information | |
parent | d26b9a2c82d8df98211d2362a3b235f8420eb0d1 (diff) | |
parent | 67c9ab299d135e8866e81868843197dd3aa78d02 (diff) | |
download | vyatta-cfg-quagga-c9b4583f38f4bc7fedef6f05d31ef7ea2020473a.tar.gz vyatta-cfg-quagga-c9b4583f38f4bc7fedef6f05d31ef7ea2020473a.zip |
Merge branch 'glendale' into hollywood
Diffstat (limited to 'templates/protocols/ospf/default-information')
-rw-r--r-- | templates/protocols/ospf/default-information/originate/node.def | 52 |
1 files changed, 29 insertions, 23 deletions
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; |