diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/VyattaConfig.pm | 4 | ||||
-rwxr-xr-x | scripts/VyattaConfigLoad.pm | 3 | ||||
-rwxr-xr-x | scripts/VyattaConfigOutput.pm | 6 |
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; |