diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2010-02-10 19:12:27 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2010-02-10 19:12:27 -0800 |
commit | 3b38a06aff94a1be2540a7f30e8ed1246b3a4af5 (patch) | |
tree | 96fba930bbdeddb82e117a92e4a03dab47d9ccb8 | |
parent | 19268c41ff28c4dab12cbfbac0d61737c473a4e1 (diff) | |
download | vyatta-cfg-3b38a06aff94a1be2540a7f30e8ed1246b3a4af5.tar.gz vyatta-cfg-3b38a06aff94a1be2540a7f30e8ed1246b3a4af5.zip |
improve default value parsing
-rwxr-xr-x | lib/Vyatta/Config.pm | 5 |
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; } |