diff options
author | Michael Larson <slioch@slioch.vyatta.com> | 2010-05-27 16:49:15 -0700 |
---|---|---|
committer | Michael Larson <slioch@slioch.vyatta.com> | 2010-05-27 16:49:15 -0700 |
commit | 70a5badd225f432f44268d027a617d7674169d35 (patch) | |
tree | e793bddb60e97ebec1c02a224e8329baa4904693 /lib | |
parent | e1213d8968b7791d9160dfd5679b12d0110b5891 (diff) | |
download | vyatta-cfg-70a5badd225f432f44268d027a617d7674169d35.tar.gz vyatta-cfg-70a5badd225f432f44268d027a617d7674169d35.zip |
fix for content-inspection on deactivate.
further changes forthcoming to the perl api to support interfaces outside of listNodes.
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Vyatta/Config.pm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/Vyatta/Config.pm b/lib/Vyatta/Config.pm index 91f8101..cc917b4 100755 --- a/lib/Vyatta/Config.pm +++ b/lib/Vyatta/Config.pm @@ -93,7 +93,12 @@ sub listNodes { $tmp =~ s/\n//g; $tmp =~ s/%2F/\//g; #print "DEBUG Vyatta::Config->listNodes(): node = $tmp\n"; - push @nodes_modified, $tmp; + my $ttmp = $self->{_current_dir_level} . "/" . $tmp; + $ttmp =~ s/\// /g; + my ($status, undef) = $self->getDeactivated($ttmp); + if (!defined($status) || $status eq 'active') { + push @nodes_modified, $tmp; + } } return @nodes_modified; @@ -583,9 +588,7 @@ sub getDeactivated { $node =~ s/\//%2F/g; $node =~ s/\s+/\//g; #now walk up parent in local and in active looking for '.disable' file - - my @a = split(" ",$node); - $node = join("/",@a); + $node =~ s/ /\//g; while (1) { my $filepath = "$self->{_changes_only_dir_base}/$node"; |