From eedd04171ff3c6017e52830e8e07ec437e1c6663 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 25 Mar 2009 14:15:44 -0700 Subject: 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. --- .../ip/rip/authentication/plaintext-password/node.def | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 interface-templates/ip/rip/authentication/plaintext-password/node.def (limited to 'interface-templates/ip/rip/authentication/plaintext-password/node.def') diff --git a/interface-templates/ip/rip/authentication/plaintext-password/node.def b/interface-templates/ip/rip/authentication/plaintext-password/node.def new file mode 100644 index 00000000..f4fefb78 --- /dev/null +++ b/interface-templates/ip/rip/authentication/plaintext-password/node.def @@ -0,0 +1,13 @@ +type: txt +help: Set plain text password +syntax:expression: pattern $VAR(@) "^[^[:space:]{1,16}$" ; "Password must be 16 characters or less" +commit:expression: $VAR(../md5/) == "" ; "md5 password already set" + +update: vyatta-vtysh -c "configure terminal" -c "interface $IFNAME" \ + -c "ip rip authentication mode text" -c "ip rip authentication string $VAR(@)"; + +delete: vyatta-vtysh -c "configure terminal" -c "interface $IFNAME" \ + -c "no ip rip authentication mode" -c "no ip rip authentication string $VAR(@)"; + +comp_help: possible completions: + Password (16 characters or less) -- cgit v1.2.3