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/ospf/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/ospf/authentication/md5')
4 files changed, 31 insertions, 0 deletions
diff --git a/interface-templates/ip/ospf/authentication/md5/key-id/node.def b/interface-templates/ip/ospf/authentication/md5/key-id/node.def new file mode 100644 index 00000000..630bd3f0 --- /dev/null +++ b/interface-templates/ip/ospf/authentication/md5/key-id/node.def @@ -0,0 +1,16 @@ +tag: +type: u32 +help: Set MD5 key id +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "ID must be between (1-255)" +commit:expression: $VAR(md5-key/) != ""; "Must add the md5-key for key-id $VAR(@)" +delete:touch /tmp/ospf-md5.$PPID + +end: if [ -f /tmp/ospf-md5.$PPID ] + then vyatta-vtysh -c "configure terminal" -c "interface $IFNAME" \ + -c "no ip ospf message-digest-key $VAR(@)" + rm /tmp/ospf-md5.$PPID \ + else vyatta-vtysh -c "configure terminal" -c "interface $IFNAME" \ + -c "ip ospf message-digest-key $VAR(@) md5 $VAR(md5-key/@)" + fi +comp_help: possible completions: + <1-255> Set the key id diff --git a/interface-templates/ip/ospf/authentication/md5/key-id/node.tag/md5-key/node.def b/interface-templates/ip/ospf/authentication/md5/key-id/node.tag/md5-key/node.def new file mode 100644 index 00000000..5efd3ef7 --- /dev/null +++ b/interface-templates/ip/ospf/authentication/md5/key-id/node.tag/md5-key/node.def @@ -0,0 +1,9 @@ +type: txt +help: Set md5 key +syntax:expression: exec " \ + if [ `echo -n '$VAR(@)' | wc -c` -gt 16 ]; then \ + echo MD5 key must be 16 characters or less ; \ + exit 1 ; \ + fi ; " +comp_help: possible completions: + <text> MD5 Key (16 characters or less) diff --git a/interface-templates/ip/ospf/authentication/md5/key-id/node.tag/node.def b/interface-templates/ip/ospf/authentication/md5/key-id/node.tag/node.def new file mode 100644 index 00000000..d14a2583 --- /dev/null +++ b/interface-templates/ip/ospf/authentication/md5/key-id/node.tag/node.def @@ -0,0 +1 @@ +help: Set md5 key diff --git a/interface-templates/ip/ospf/authentication/md5/node.def b/interface-templates/ip/ospf/authentication/md5/node.def new file mode 100644 index 00000000..9389c838 --- /dev/null +++ b/interface-templates/ip/ospf/authentication/md5/node.def @@ -0,0 +1,5 @@ +help: Set MD5 key id +update:vyatta-vtysh -c "configure terminal" -c "interface $IFNAME" \ + -c "no ip ospf authentication" -c "ip ospf authentication message-digest" +delete:vyatta-vtysh -c "configure terminal" -c "interface $IFNAME" + -c "no ip ospf authentication" |