Use PERL_LWP_SSL_CA_PATH not HTTPS_CA_DIR as the latter has issues.
[mirror/dsa-nagios.git] / dsa-nagios-checks / checks / dsa-check-libs
index 77707d9..5d49855 100755 (executable)
@@ -30,7 +30,7 @@ $ENV{'PATH'} = '/bin:/sbin:/usr/bin:/usr/sbin';
 delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
 
 my $LSOF = '/usr/bin/lsof -F0';
-my $VERSION = '0.2012042101';
+my $VERSION = '0.2015012901';
 
 # nagios exit codes
 my $OK = 0;
@@ -170,6 +170,9 @@ LINE: for my $line (@lsof)  {
        my $inode = $fields{i};
        my $path  = $fields{n};
        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.
+
                $path =~ s/^\(deleted\)//; # in some cases "(deleted)" is at the beginning of the string
                for my $i (@{$config->{'ignorelist'}}) {
                        my $ignore = eval($i);