diff options
author | rbalocca <rbalocca@vyatta.com> | 2008-04-11 14:39:29 -0700 |
---|---|---|
committer | rbalocca <rbalocca@vyatta.com> | 2008-04-11 14:39:29 -0700 |
commit | 11c599572e730c22198aa3d35cdc113b638ca4a8 (patch) | |
tree | 05d062beb68b0a3dd5a50df622d354ac3fa28852 | |
parent | 17a6da10c0fcb87edcad978daa1f1462515cc011 (diff) | |
parent | c999ddec2a30f23121072d51a49003fd822527d7 (diff) | |
download | vyatta-cfg-quagga-11c599572e730c22198aa3d35cdc113b638ca4a8.tar.gz vyatta-cfg-quagga-11c599572e730c22198aa3d35cdc113b638ca4a8.zip |
Merge branch 'glendale' into hollywood
Conflicts:
templates/protocols/ospf/area/node.tag/range/node.tag/cost/node.def
templates/protocols/ospf/area/node.tag/range/node.tag/not-advertise/node.def
templates/protocols/ospf/area/node.tag/range/node.tag/substitute/node.def
templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/md5/node.def
templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/plaintext-password/node.def
5 files changed, 68 insertions, 40 deletions
diff --git a/templates/protocols/ospf/area/node.tag/range/node.def b/templates/protocols/ospf/area/node.tag/range/node.def index e3c21eea..b8f514e2 100644 --- a/templates/protocols/ospf/area/node.tag/range/node.def +++ b/templates/protocols/ospf/area/node.tag/range/node.def @@ -2,9 +2,44 @@ tag: type: ipv4net help: Set to summarize routes matching prefix (border routers only) syntax:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-prefix-boundry $VAR(@)" -create:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"area $VAR(../@) range $VAR(@)\"; " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"no area $VAR(../@) range $VAR(@)\"; " + +delete: touch /tmp/ospf-range.$PPID + +end: if [ -f /tmp/ospf-range.$PPID ]; then + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "no area $VAR(../@) range $VAR(@)"; + rm /tmp/ospf-range.$PPID; + else + ${vyatta_sbindir}/vyatta-check-typeless-node.pl \ + "protocols ospf area $VAR(../@) range $VAR(@) not-advertise"; + if [ $? -eq 0 ] ; then + if [ -n "$VAR(cost/@)" ] || [ -n "$VAR(substitute/@)" ]; then + echo "Remove 'not-advertise' before setting cost or substitue"; + exit 1; + fi; + ${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c "configure terminal" \ + -c "router ospf" \ + -c "no area $VAR(../@) range $VAR(@)"; + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "area $VAR(../@) range $VAR(@) not-advertise"; + else + ${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c "configure terminal" \ + -c "router ospf" \ + -c "no area $VAR(../@) range $VAR(@)"; + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "area $VAR(../@) range $VAR(@)"; + if [ -n "$VAR(cost/@)" ]; then + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "area $VAR(../@) range $VAR(@) cost $VAR(cost/@)"; + fi; + if [ -n "$VAR(substitute/@)" ]; then + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "area $VAR(../@) range $VAR(@) substitute $VAR(substitute/@)"; + fi; + fi; + fi; diff --git a/templates/protocols/ospf/area/node.tag/range/node.tag/cost/node.def b/templates/protocols/ospf/area/node.tag/range/node.tag/cost/node.def index 7ee65934..22665949 100644 --- a/templates/protocols/ospf/area/node.tag/range/node.tag/cost/node.def +++ b/templates/protocols/ospf/area/node.tag/range/node.tag/cost/node.def @@ -1,11 +1,6 @@ type: u32 help: Set metric for this range syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 16777215; "Metric must be between 0-16777215" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"area $VAR(../../@) range $VAR(../@) cost $VAR(@)\"; " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"no area $VAR(../../@) range $VAR(../@) cost $VAR(@)\"; " + comp_help: possible completions: - <0-16777215> Set metric for this range + <0-16777215> Set metric for this range diff --git a/templates/protocols/ospf/area/node.tag/range/node.tag/substitute/node.def b/templates/protocols/ospf/area/node.tag/range/node.tag/substitute/node.def index 6dbc7be6..67ef935a 100644 --- a/templates/protocols/ospf/area/node.tag/range/node.tag/substitute/node.def +++ b/templates/protocols/ospf/area/node.tag/range/node.tag/substitute/node.def @@ -1,9 +1,3 @@ type: ipv4net help: Set to announce area range as another prefix syntax:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-prefix-boundry $VAR(@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"area $VAR(../../@) range $VAR(../@) substitute $VAR(@)\"; " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"no area $VAR(../../@) range $VAR(../@) substitute $VAR(@)\"; " diff --git a/templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/md5/node.def b/templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/md5/node.def index 65f6d60b..ec2d1f49 100644 --- a/templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/md5/node.def +++ b/templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/md5/node.def @@ -1,14 +1,16 @@ help: Set MD5 key id -create:expression: "${vyatta_sbindir}/vyatta-vtysh.pl \ - -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"no area $VAR(../../../@) virtual-link $VAR(../../@) \ - authentication-key\" \ - -c \"area $VAR(../../../@) virtual-link $VAR(../../@) \ - authentication message-digest\"; " +commit:expression: $VAR(../plaintext-password/) == "" ; "plaintext-password already set" -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl \ - -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"area $VAR(../../../@) virtual-link $VAR(../../@) \ - authentication null\"; " +create: ${vyatta_sbindir}/vyatta-vtysh.pl \ + -c "configure terminal" \ + -c "router ospf" \ + -c "no area $VAR(../../../@) virtual-link $VAR(../../@) \ + authentication-key" \ + -c "area $VAR(../../../@) virtual-link $VAR(../../@) \ + authentication message-digest"; + +delete: ${vyatta_sbindir}/vyatta-vtysh.pl \ + -c "configure terminal" \ + -c "router ospf" \ + -c "area $VAR(../../../@) virtual-link $VAR(../../@) \ + authentication null"; diff --git a/templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/plaintext-password/node.def b/templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/plaintext-password/node.def index 14539e12..b58d9d30 100644 --- a/templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/plaintext-password/node.def +++ b/templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/plaintext-password/node.def @@ -6,15 +6,17 @@ syntax:expression: exec " \ exit 1 ; \ fi ; " -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl \ - -c \"configure terminal\" -c \"router ospf\" \ - -c \"area $VAR(../../../@) virtual-link $VAR(../../@) \ - authentication authentication-key $VAR(@) \"; " +commit:expression: $VAR(../md5/) == "" ; "md5 password already set" -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl \ - -c \"configure terminal\" -c \"router ospf\" \ - -c \"no area $VAR(../../../@) virtual-link $VAR(../../@) \ - authentication authentication-key \"; " +update: ${vyatta_sbindir}/vyatta-vtysh.pl \ + -c "configure terminal" -c "router ospf" \ + -c "area $VAR(../../../@) virtual-link $VAR(../../@) \ + authentication authentication-key $VAR(@) " + +delete: ${vyatta_sbindir}/vyatta-vtysh.pl \ + -c "configure terminal" -c "router ospf" \ + -c "no area $VAR(../../../@) virtual-link $VAR(../../@) \ + authentication authentication-key"; comp_help: possible completions: - <text> Plain text password (8 characters or less) + <text> Plain text password (8 characters or less) |