summaryrefslogtreecommitdiff
path: root/scripts/VyattaConfigOutput.pm
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2007-11-27 17:26:33 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2007-11-27 17:26:33 -0800
commit79b6f234a4905e5f96a65526f2a72fa41cc1d331 (patch)
treea95bf2779163eb754e1c3fc8fad17276a87d976b /scripts/VyattaConfigOutput.pm
parente937ae5d376b03e89f8ade6e6c015979f59fa363 (diff)
downloadvyatta-cfg-79b6f234a4905e5f96a65526f2a72fa41cc1d331.tar.gz
vyatta-cfg-79b6f234a4905e5f96a65526f2a72fa41cc1d331.zip
distinguish deleted and nonexistent nodes in show output.
Diffstat (limited to 'scripts/VyattaConfigOutput.pm')
-rwxr-xr-xscripts/VyattaConfigOutput.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/VyattaConfigOutput.pm b/scripts/VyattaConfigOutput.pm
index f16007d..56c3a74 100755
--- a/scripts/VyattaConfigOutput.pm
+++ b/scripts/VyattaConfigOutput.pm
@@ -250,7 +250,12 @@ sub outputNewConfig {
if (scalar(keys %rnodes) > 0) {
displayChildren(\%rnodes, [ @_ ], '');
} else {
- print "Current configuration is empty\n";
+ if (defined($config->existsOrig())) {
+ # this is a deleted node
+ print 'Configuration under "' . (join ' ', @_) . "\" has been deleted\n";
+ } else {
+ print "Current configuration is empty\n";
+ }
}
}