summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2010-06-09 14:33:41 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2010-06-09 14:33:41 -0700
commit9e84035a42dcc335d9799256d7f465c3e3277500 (patch)
treeacd43c7b69a5cd6411eb67fc93860412c893b012
parent66a1ec9637909acfca069a0d21c7d6e7170c5266 (diff)
downloadvyatta-cfg-9e84035a42dcc335d9799256d7f465c3e3277500.tar.gz
vyatta-cfg-9e84035a42dcc335d9799256d7f465c3e3277500.zip
fix another default value display problem
-rwxr-xr-xlib/Vyatta/Config.pm2
-rwxr-xr-xlib/Vyatta/ConfigOutput.pm12
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/Vyatta/Config.pm b/lib/Vyatta/Config.pm
index 4ae578c..4c149cf 100755
--- a/lib/Vyatta/Config.pm
+++ b/lib/Vyatta/Config.pm
@@ -1,4 +1,4 @@
-# Author: An-Cheng Huang <ancheng@vyatta.com>
+# Author: Vyatta <eng@vyatta.com>
# Date: 2007
# Description: vyatta configuration parser
diff --git a/lib/Vyatta/ConfigOutput.pm b/lib/Vyatta/ConfigOutput.pm
index c92cee4..09713f9 100755
--- a/lib/Vyatta/ConfigOutput.pm
+++ b/lib/Vyatta/ConfigOutput.pm
@@ -1,4 +1,4 @@
-# Author: An-Cheng Huang <ancheng@vyatta.com>
+# Author: Vyatta <eng@vyatta.com>
# Date: 2007
# Description: Perl module for generating output of the configuration.
@@ -143,7 +143,8 @@ sub displayValues {
my @cnames = sort keys %cnodes;
if (defined($simple_show)) {
- if (!$cnodes{'def'} || $show_all) {
+ if (!defined($cnodes{'def'}) or $cnodes{'def'} eq 'deleted'
+ or $show_all) {
if ($is_password && $hide_password) {
$oval = $HIDE_PASSWORD;
}
@@ -164,15 +165,14 @@ sub displayValues {
$diff = '>';
}
}
- if (!$cnodes{'def'} || $show_all) {
+ # also need to handle the case where def marker is deleted.
+ if (!defined($cnodes{'def'}) or $cnodes{'def'} eq 'deleted'
+ or $show_all) {
if ($is_password && $hide_password) {
$value = $HIDE_PASSWORD;
}
print "$dis$diff$prefix$name $value\n";
}
- elsif ($cnodes{'def'} && ($diff eq '>' || $diff eq '-')) {
- print "$dis$diff$prefix$name $value\n";
- }
}
}