From: Peter Palfrader Date: Wed, 18 Feb 2015 11:13:17 +0000 (+0100) Subject: dsa-check-libs: Ignore deleted directories that we happen to be in X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=bd83fd9e2c07dd57e6078d248cc934e95f2f375e;p=mirror%2Fdsa-puppet.git dsa-check-libs: Ignore deleted directories that we happen to be in --- diff --git a/modules/nagios/files/dsa-check-libs b/modules/nagios/files/dsa-check-libs index 5d4985593..87a886d76 100755 --- a/modules/nagios/files/dsa-check-libs +++ b/modules/nagios/files/dsa-check-libs @@ -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'}}) {