summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2007-11-27 18:22:07 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2007-11-27 18:22:07 -0800
commit0412198b9f339ac66be18e04a73d4366ebb86116 (patch)
treed38b8f95e4ce65d5390022c5bc2731e6e498d66a /scripts
parent79b6f234a4905e5f96a65526f2a72fa41cc1d331 (diff)
downloadvyatta-cfg-0412198b9f339ac66be18e04a73d4366ebb86116.tar.gz
vyatta-cfg-0412198b9f339ac66be18e04a73d4366ebb86116.zip
fix for bug 2490: display node value(s) when a leaf node is specified
with "show".
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/VyattaConfigOutput.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/VyattaConfigOutput.pm b/scripts/VyattaConfigOutput.pm
index 56c3a74..8b43c18 100755
--- a/scripts/VyattaConfigOutput.pm
+++ b/scripts/VyattaConfigOutput.pm
@@ -248,7 +248,13 @@ sub outputNewConfig {
$config->setLevel(join ' ', @_);
my %rnodes = $config->listNodeStatus();
if (scalar(keys %rnodes) > 0) {
- displayChildren(\%rnodes, [ @_ ], '');
+ my @rn = keys %rnodes;
+ if ($#rn == 0 && $rn[0] eq 'node.val') {
+ # this is a leaf value-node
+ displayValues([ @_ ], '', $_[$#_]);
+ } else {
+ displayChildren(\%rnodes, [ @_ ], '');
+ }
} else {
if (defined($config->existsOrig())) {
# this is a deleted node