summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMichael Larson <slioch@eng-140.vyatta.com>2008-04-23 10:42:45 -0700
committerMichael Larson <slioch@eng-140.vyatta.com>2008-04-23 10:42:45 -0700
commit3dfd14fbb84b14cfb632171cac15546bfea79a68 (patch)
treee926c8fb7cc4b444648a332f97d6f22ac6f76b0c /scripts
parentd8d8f23716ceabf452940be950c060602a636c62 (diff)
downloadvyatta-cfg-3dfd14fbb84b14cfb632171cac15546bfea79a68.tar.gz
vyatta-cfg-3dfd14fbb84b14cfb632171cac15546bfea79a68.zip
mask out def markers in config script
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/VyattaConfigOutput.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/VyattaConfigOutput.pm b/scripts/VyattaConfigOutput.pm
index 2766b64..2c92132 100755
--- a/scripts/VyattaConfigOutput.pm
+++ b/scripts/VyattaConfigOutput.pm
@@ -189,6 +189,8 @@ sub displayDeletedOrigChildren {
if ($#cnames == 0 && $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;
@@ -244,6 +246,8 @@ sub displayChildren {
my @cnames = sort keys %cnodes;
if ($#cnames == 0 && $cnames[0] eq 'node.val') {
displayValues([ @cur_path, $child ], $prefix, $child);
+ } elsif ($cnames[0] eq 'def') {
+ #skip
} elsif (scalar($#cnames) >= 0) {
if ($is_tag) {
@cnames = sort versioncmp @cnames;
@@ -286,6 +290,8 @@ sub displayChildren {
my @onodes = $config->listOrigNodes(join ' ', (@cur_path, $child));
if ($#onodes == 0 && $onodes[0] eq 'node.val') {
displayValues([ @cur_path, $child ], $prefix, $child);
+ } elsif ($onodes[0] eq 'def') {
+ #skip this
} else {
print "$diff$prefix$child {\n";
displayDeletedOrigChildren([ @cur_path, $child ], "$prefix ");
@@ -312,6 +318,8 @@ sub outputNewConfig {
if ($#rn == 0 && $rn[0] eq 'node.val') {
# this is a leaf value-node
displayValues([ @_ ], '', $_[$#_]);
+ } elsif ($rn[0] eq 'def') {
+ #skip
} else {
displayChildren(\%rnodes, [ @_ ], '');
}