summaryrefslogtreecommitdiff
path: root/lib/Vyatta/Config.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Vyatta/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);