summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Larson <slioch@slioch.vyatta.com>2010-04-16 11:09:35 -0700
committerMichael Larson <slioch@slioch.vyatta.com>2010-04-16 11:09:35 -0700
commitd29097a8800e16899873bea1b70b85b0bd3586ab (patch)
treef1f094f07947c6bc52bf6f9b30922e22a1499feb
parent8dc3118aea81bb95f274965178fc1dd6084cc58d (diff)
downloadvyatta-cfg-d29097a8800e16899873bea1b70b85b0bd3586ab.tar.gz
vyatta-cfg-d29097a8800e16899873bea1b70b85b0bd3586ab.zip
multinode limit and multiple types now supported through config.pm
-rwxr-xr-xlib/Vyatta/Config.pm25
1 files changed, 15 insertions, 10 deletions
diff --git a/lib/Vyatta/Config.pm b/lib/Vyatta/Config.pm
index 58dd7ea..4ede95e 100755
--- a/lib/Vyatta/Config.pm
+++ b/lib/Vyatta/Config.pm
@@ -742,19 +742,24 @@ sub parseTmplAll {
open(my $tmpl, '<', "$tpath/node.def")
or return;
foreach (<$tmpl>) {
- if (/^multi:/) {
- $ret{multi} = 1;
- } elsif (/^tag:/) {
- $ret{tag} = 1;
+ if (/^multi:\s*(\S+)?$/) {
+ $ret{multi} = 1;
+ $ret{limit} = $1;
+ } elsif (/^tag:\s*(\S+)?$/) {
+ $ret{tag} = 1;
+ $ret{limit} = $1;
+ } elsif (/^type:\s+(\S+),\s*(\S+)\s*$/) {
+ $ret{type} = $1;
+ $ret{type2} = $2;
} elsif (/^type:\s+(\S+)\s*$/) {
- $ret{type} = $1;
+ $ret{type} = $1;
} elsif (/^default:\s+(\S.*)\s*$/) {
- $ret{default} = $1;
- if ($ret{default} =~ /^"(.*)"$/) {
- $ret{default} = $1;
- }
+ $ret{default} = $1;
+ if ($ret{default} =~ /^"(.*)"$/) {
+ $ret{default} = $1;
+ }
} elsif (/^help:\s+(\S.*)$/) {
- $ret{help} = $1;
+ $ret{help} = $1;
}
}
close($tmpl);