summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2010-02-10 19:12:27 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2010-02-10 19:12:27 -0800
commit3b38a06aff94a1be2540a7f30e8ed1246b3a4af5 (patch)
tree96fba930bbdeddb82e117a92e4a03dab47d9ccb8 /lib
parent19268c41ff28c4dab12cbfbac0d61737c473a4e1 (diff)
downloadvyatta-cfg-3b38a06aff94a1be2540a7f30e8ed1246b3a4af5.tar.gz
vyatta-cfg-3b38a06aff94a1be2540a7f30e8ed1246b3a4af5.zip
improve default value parsing
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Vyatta/Config.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Vyatta/Config.pm b/lib/Vyatta/Config.pm
index 633d747..515be64 100755
--- a/lib/Vyatta/Config.pm
+++ b/lib/Vyatta/Config.pm
@@ -747,8 +747,11 @@ sub parseTmplAll {
$ret{tag} = 1;
} elsif (/^type:\s+(\S+)\s*$/) {
$ret{type} = $1;
- } elsif (/^default:\s+(\S+)\s*$/) {
+ } elsif (/^default:\s+(\S.*)\s*$/) {
$ret{default} = $1;
+ if ($ret{default} =~ /^"(.*)"$/) {
+ $ret{default} = $1;
+ }
} elsif (/^help:\s+(\S.*)$/) {
$ret{help} = $1;
}