From e179cfe208f3889164b4682a6cf6e938857bcca9 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 27 Mar 2009 15:49:29 -0700 Subject: Cleanup indentation of authentication template Fix problem with conversion from expression to non-expression format of template. --- .../ip/ospf/authentication/md5/key-id/node.def | 19 +++++++++++-------- .../md5/key-id/node.tag/md5-key/node.def | 3 +-- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'interface-templates') diff --git a/interface-templates/ip/ospf/authentication/md5/key-id/node.def b/interface-templates/ip/ospf/authentication/md5/key-id/node.def index 630bd3f0..8f6d90ca 100644 --- a/interface-templates/ip/ospf/authentication/md5/key-id/node.def +++ b/interface-templates/ip/ospf/authentication/md5/key-id/node.def @@ -2,15 +2,18 @@ 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(@)" +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 +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 -f /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 index 5e7a121e..b928e426 100644 --- 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 @@ -1,6 +1,5 @@ type: txt help: Set md5 key -syntax:expression: pattern "^[^[:space:]]{1,16}" ; \ - "MD5 key must be 16 characters or less" +syntax:expression: pattern $VAR(@) "^[^[:space:]]{1,16}$"; "MD5 key must be 16 characters or less" comp_help: possible completions: MD5 Key (16 characters or less) -- cgit v1.2.3