diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2007-11-02 17:01:43 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2007-11-02 17:01:43 -0700 |
commit | 902f98e233479bb9e8fffa9d158d14739714d48a (patch) | |
tree | d5684cf1dc78d05218b1c8e2a5f522919b9bf2a1 /scripts/VyattaConfig.pm | |
parent | 0d97c5e0f56a22577abb0a38fec10a06e9b618e8 (diff) | |
download | vyatta-cfg-902f98e233479bb9e8fffa9d158d14739714d48a.tar.gz vyatta-cfg-902f98e233479bb9e8fffa9d158d14739714d48a.zip |
* config-mode "show" command now hides default values.
* add "show -all" command to display all values.
* "save" command saves all values.
Diffstat (limited to 'scripts/VyattaConfig.pm')
-rw-r--r-- | scripts/VyattaConfig.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/VyattaConfig.pm b/scripts/VyattaConfig.pm index e9a1f97..1645be6 100644 --- a/scripts/VyattaConfig.pm +++ b/scripts/VyattaConfig.pm @@ -463,7 +463,7 @@ sub hasTmplChildren { sub parseTmpl { my $self = shift; my $cfg_path_ref = shift; - my ($is_multi, $is_text) = (0, 0); + my ($is_multi, $is_text, $default) = (0, 0, undef); my $tpath = $self->getTmplPath($cfg_path_ref); if (! -r "$tpath/node.def") { return ($is_multi, $is_text); @@ -476,9 +476,12 @@ sub parseTmpl { if (/^type:\s+txt\s*$/) { $is_text = 1; } + if (/^default:\s+(\S+)\s*$/) { + $default = $1; + } } close TMPL; - return ($is_multi, $is_text); + return ($is_multi, $is_text, $default); } ###### misc functions ###### |