]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
dsa-check-libs: Ignore deleted directories that we happen to be in
authorPeter Palfrader <peter@palfrader.org>
Wed, 18 Feb 2015 11:13:17 +0000 (12:13 +0100)
committerPeter Palfrader <peter@palfrader.org>
Wed, 18 Feb 2015 11:13:17 +0000 (12:13 +0100)
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'}}) {