From a5ced88405aa3d4517707ff14631ed42f53a97be Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sat, 7 Jun 2014 11:21:36 +0000 Subject: Remove "(deleted)" from front of path. This may happen in openvz containers for /dev/zero for instance git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@672 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- nagios-check-libs | 1 + 1 file changed, 1 insertion(+) (limited to 'nagios-check-libs') diff --git a/nagios-check-libs b/nagios-check-libs index 977605d..4406413 100755 --- a/nagios-check-libs +++ b/nagios-check-libs @@ -170,6 +170,7 @@ LINE: for my $line (@lsof) { my $inode = $fields{i}; my $path = $fields{n}; if ($path =~ m/\.dpkg-/ || $path =~ m/\(deleted\)/ || $path =~ /path inode=/ || $fd eq 'DEL') { + $path =~ s/^\(deleted\)//; # in some cases "(deleted)" is at the beginning of the string for my $i (@{$config->{'ignorelist'}}) { my $ignore = eval($i); next LINE if $ignore; -- cgit v1.2.3