summaryrefslogtreecommitdiff
path: root/nagios-check-libs
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2014-06-07 11:21:36 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2014-06-07 11:21:36 +0000
commita5ced88405aa3d4517707ff14631ed42f53a97be (patch)
treec72568daafd24d296044e9f0659f523a0974e9fe /nagios-check-libs
parent7ad814017a8a9bd005edd64266b939976a018110 (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-xnagios-check-libs1
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;