From bd83fd9e2c07dd57e6078d248cc934e95f2f375e Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Wed, 18 Feb 2015 12:13:17 +0100 Subject: [PATCH] dsa-check-libs: Ignore deleted directories that we happen to be in --- modules/nagios/files/dsa-check-libs | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/nagios/files/dsa-check-libs b/modules/nagios/files/dsa-check-libs index 5d498559..87a886d7 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'}}) { -- 2.39.5