diff options
author | Peter Palfrader <peter@palfrader.org> | 2014-06-07 11:21:36 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2014-06-07 11:21:36 +0000 |
commit | a5ced88405aa3d4517707ff14631ed42f53a97be (patch) | |
tree | c72568daafd24d296044e9f0659f523a0974e9fe /nagios-check-libs | |
parent | 7ad814017a8a9bd005edd64266b939976a018110 (diff) |
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
Diffstat (limited to 'nagios-check-libs')
-rwxr-xr-x | nagios-check-libs | 1 |
1 files changed, 1 insertions, 0 deletions
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; |