From 3b38a06aff94a1be2540a7f30e8ed1246b3a4af5 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Wed, 10 Feb 2010 19:12:27 -0800 Subject: improve default value parsing --- lib/Vyatta/Config.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3