summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMichael Larson <slioch@eng-140.vyatta.com>2008-07-10 13:37:49 -0700
committerMichael Larson <slioch@eng-140.vyatta.com>2008-07-10 13:37:49 -0700
commita2be0181a81adfca6f8fdf7c9b6190244c7146e2 (patch)
treea773f2fc1e13b29167157ebd985476875ced5afd /scripts
parent42d6c942800e2273b77ea92371ffdcb3f183163f (diff)
downloadvyatta-cfg-a2be0181a81adfca6f8fdf7c9b6190244c7146e2.tar.gz
vyatta-cfg-a2be0181a81adfca6f8fdf7c9b6190244c7146e2.zip
Revert "fix for bug 3441. Removed def from listOutputNodes(), which allowed other code that filters out def file to be removed."
Need to spend more time with this fix--'def' is used in locations to suppress non-user specified default values. will reapply revised fix after a bit more vetting. This reverts commit 42d6c942800e2273b77ea92371ffdcb3f183163f.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/VyattaConfig.pm4
-rwxr-xr-xscripts/VyattaConfigLoad.pm3
-rwxr-xr-xscripts/VyattaConfigOutput.pm6
3 files changed, 8 insertions, 5 deletions
diff --git a/scripts/VyattaConfig.pm b/scripts/VyattaConfig.pm
index 1c0eaf3..3c4b51f 100755
--- a/scripts/VyattaConfig.pm
+++ b/scripts/VyattaConfig.pm
@@ -130,9 +130,7 @@ sub listOrigNodes {
$tmp =~ s/\n//g;
$tmp =~ s/%2F/\//g;
#print "DEBUG VyattaConfig->listNodes(): node = $tmp\n";
- if ($tmp ne 'def') {
- push @nodes_modified, $tmp;
- }
+ push @nodes_modified, $tmp;
}
return @nodes_modified;
diff --git a/scripts/VyattaConfigLoad.pm b/scripts/VyattaConfigLoad.pm
index c8563bb..1a7f26e 100755
--- a/scripts/VyattaConfigLoad.pm
+++ b/scripts/VyattaConfigLoad.pm
@@ -297,6 +297,9 @@ sub findDeletedNodes {
$active_cfg->setLevel(join ' ', @active_path);
my @active_nodes = $active_cfg->listOrigNodes();
foreach (@active_nodes) {
+ if ($_ eq 'def') {
+ next;
+ }
if ($_ eq 'node.val') {
findDeletedValues($new_ref, \@active_path);
next;
diff --git a/scripts/VyattaConfigOutput.pm b/scripts/VyattaConfigOutput.pm
index ab7068f..5358c21 100755
--- a/scripts/VyattaConfigOutput.pm
+++ b/scripts/VyattaConfigOutput.pm
@@ -138,7 +138,7 @@ sub displayValues {
my @cnames = sort keys %cnodes;
if (defined($simple_show)) {
- if ($show_all) {
+ if (!$cnodes{'def'} || $show_all) {
if ($is_password && $hide_password) {
$oval = $HIDE_PASSWORD;
}
@@ -159,7 +159,7 @@ sub displayValues {
$diff = '>';
}
}
- if ($show_all) {
+ if (!$cnodes{'def'} || $show_all) {
if ($is_password && $hide_password) {
$value = $HIDE_PASSWORD;
}
@@ -194,6 +194,8 @@ sub displayDeletedOrigChildren {
if ($cnames[0] eq 'node.val') {
displayValues([ @cur_path, $child ], $prefix, $child,
$dont_show_as_deleted);
+ } elsif ($cnames[0] eq 'def') {
+ #ignore
} elsif (scalar($#cnames) >= 0) {
if ($is_tag) {
@cnames = sort versioncmp @cnames;