diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-03-25 14:15:44 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-03-25 14:15:44 -0700 |
commit | eedd04171ff3c6017e52830e8e07ec437e1c6663 (patch) | |
tree | 2e6be92570d53c1e134c806e3de7e0477b11c017 /interface-templates/ip/rip/authentication/md5 | |
parent | 82b2f6abc7b3b5e3164675c28a27506b39eeb9a7 (diff) | |
download | vyatta-cfg-quagga-eedd04171ff3c6017e52830e8e07ec437e1c6663.tar.gz vyatta-cfg-quagga-eedd04171ff3c6017e52830e8e07ec437e1c6663.zip |
Generate interface templates as part of build
Rather than 100's of copies of the same template, use the same
process as the firewall module to generate the templates.
For this, the are meta-templates in interface-templates directory
which get processed and $IFNAME is replaced by the appropriate CLI
syntax to refer back to the directory name. Changing a quagga
template in most cases can be done by fixing the meta-template.
Diffstat (limited to 'interface-templates/ip/rip/authentication/md5')
3 files changed, 28 insertions, 0 deletions
diff --git a/interface-templates/ip/rip/authentication/md5/node.def b/interface-templates/ip/rip/authentication/md5/node.def new file mode 100644 index 00000000..8d165fe6 --- /dev/null +++ b/interface-templates/ip/rip/authentication/md5/node.def @@ -0,0 +1,8 @@ +tag: +type: u32 +help: Set MD5 authentication key ID +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; \ + "ID must be between 1 and 255" + +commit:expression: $VAR(../plaintext-password/) == "" ; \ + "plaintext-password already set" diff --git a/interface-templates/ip/rip/authentication/md5/node.tag/node.def b/interface-templates/ip/rip/authentication/md5/node.tag/node.def new file mode 100644 index 00000000..488acd8c --- /dev/null +++ b/interface-templates/ip/rip/authentication/md5/node.tag/node.def @@ -0,0 +1 @@ +help: Set authentication password diff --git a/interface-templates/ip/rip/authentication/md5/node.tag/password/node.def b/interface-templates/ip/rip/authentication/md5/node.tag/password/node.def new file mode 100644 index 00000000..1d675b0b --- /dev/null +++ b/interface-templates/ip/rip/authentication/md5/node.tag/password/node.def @@ -0,0 +1,19 @@ +type: txt +help: Set authentication password +syntax:expression: pattern $VAR(@) "^[^[:space:]]{1,16}" ; "MD5 key must be 16 characters or less" + +update:vyatta-vtysh \ + -c "configure terminal" -c "interface $IFNAME" \ + -c "ip rip authentication mode md5" \ + -c "ip rip authentication key-chain $IFNAME-rip" \ + -c "key chain $IFNAME-rip" -c "key $VAR(../@)" \ + -c "key-string $VAR(@)" + +delete:vyatta-vtysh --noerror \ + -c "configure terminal" -c "interface $IFNAME" \ + -c "no ip rip authentication mode md5" \ + -c "no ip rip authentication key-chain $IFNAME-rip" \ + -c "no key chain $IFNAME-rip" " + +comp_help: possible completions: + <text> MD5 Key (16 characters or less) |