]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/nagios/files/dsa-check-libs
dsa-check-libs: Ignore deleted directories that we happen to be in
[dsa-puppet.git] / modules / nagios / files / dsa-check-libs
index 5d4985593159c4c208d1d05d1a0a23796baff654..87a886d76b5b131845563225bcf3962da643c4be 100755 (executable)
@@ -172,6 +172,7 @@ LINE: for my $line (@lsof)  {
        if ($path =~ m/\.dpkg-/ || $path =~ m/\(deleted\)/ || $path =~ /path inode=/ || $path =~ m#/\.nfs# || $fd eq 'DEL') {
                my $deleted_in_path = ($path =~ m/\(deleted\)/);
                next if ($deleted_in_path && $fd =~ /^[0-9]*$/); # Ignore deleted files that are open via normal file handles.
+               next if ($deleted_in_path && $fd eq 'cwd'); # Ignore deleted directories that we happen to be in.
 
                $path =~ s/^\(deleted\)//; # in some cases "(deleted)" is at the beginning of the string
                for my $i (@{$config->{'ignorelist'}}) {