summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Larson <slioch@slioch.vyatta.com>2010-05-27 16:49:15 -0700
committerMichael Larson <slioch@slioch.vyatta.com>2010-05-27 16:49:15 -0700
commit70a5badd225f432f44268d027a617d7674169d35 (patch)
treee793bddb60e97ebec1c02a224e8329baa4904693
parente1213d8968b7791d9160dfd5679b12d0110b5891 (diff)
downloadvyatta-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.
-rwxr-xr-xlib/Vyatta/Config.pm11
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";