diff options
author | Michael Larson <slioch@slioch.vyatta.com> | 2010-06-02 17:31:27 -0700 |
---|---|---|
committer | Michael Larson <slioch@slioch.vyatta.com> | 2010-06-02 17:31:27 -0700 |
commit | 9a92ebb852f270d530f2e8caf6aa21d87bc69612 (patch) | |
tree | 7e7cfa26201d930ae7ee77a41e53fccfd124c89e /lib | |
parent | 0075f296034d15591c8127022ceb29c9ecb18850 (diff) | |
download | vyatta-cfg-9a92ebb852f270d530f2e8caf6aa21d87bc69612.tar.gz vyatta-cfg-9a92ebb852f270d530f2e8caf6aa21d87bc69612.zip |
fix for bug 5647.
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Vyatta/Config.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Vyatta/Config.pm b/lib/Vyatta/Config.pm index 341c9dd..8d6dff2 100755 --- a/lib/Vyatta/Config.pm +++ b/lib/Vyatta/Config.pm @@ -251,7 +251,7 @@ sub listOrigNodes { my $ttmp = $self->{_current_dir_level} . "/" . $tmp; $ttmp =~ s/\// /g; my ($status, undef) = $self->getDeactivated($ttmp); - if (!defined($status) || $status eq 'active') { + if (!defined($status) || $status eq 'local') { push @nodes_modified, $tmp; } } @@ -434,7 +434,7 @@ sub returnOrigValue { $ttmp =~ s/\// /g; my ($status, undef) = $self->getDeactivated($ttmp); #only return value if status is not disabled (i.e. local or both) - if (!defined($status) || $status eq 'active') { + if (!defined($status) || $status eq 'local') { my $filepath = "$self->{_active_dir_base}$self->{_current_dir_level}/$node"; return unless open my $file, '<', "$filepath/node.val"; @@ -553,11 +553,10 @@ sub existsOrig { $ttmp =~ s/\// /g; my ($status, undef) = $self->getDeactivated($ttmp); #only return value if status is not disabled (i.e. local or both) - if (defined($status)) { #if a .disable is in local or active or both then return false - return (1 != 1); + if (defined($status) && ($status eq 'both' || $status eq 'active')) { #if a .disable is in local or active or both then return false + return undef; } - return ( -d "$self->{_active_dir_base}$self->{_current_dir_level}/$node" ); } @@ -750,6 +749,7 @@ sub listNodeStatus { #print "DEBUG Vyatta::Config->listNodeStatus(): node $node\n"; # No deleted nodes -- added, changed, ot static only. if (defined $status && $status eq 'local') { $nodehash{$node} = "deleted"; } + elsif (defined $status && $status eq 'active') { $nodehash{$node} = "added"; } elsif ($self->isAdded($nodepath)) { $nodehash{$node} = "added"; } elsif ($self->isChanged($nodepath)) { $nodehash{$node} = "changed"; } else { $nodehash{$node} = "static"; } |