summaryrefslogtreecommitdiff
path: root/templates/protocols/ospf/default-information/originate/node.def
blob: 540b39bde6997d40e31e1828dc0ecac40d7eb35b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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; "