| 1 |
Index: pkg-nagios-plugins-contrib/check_nfsmounts/check_nfsmounts |
| 2 |
=================================================================== |
| 3 |
--- pkg-nagios-plugins-contrib.orig/check_nfsmounts/check_nfsmounts |
| 4 |
+++ pkg-nagios-plugins-contrib/check_nfsmounts/check_nfsmounts |
| 5 |
@@ -45,6 +45,7 @@ BEGIN { |
| 6 |
} |
| 7 |
|
| 8 |
use Time::HiRes qw{time alarm}; |
| 9 |
+use Sys::Hostname; |
| 10 |
use Getopt::Long; |
| 11 |
use strict; |
| 12 |
|
| 13 |
@@ -129,7 +130,8 @@ foreach $dir (@dirs) { |
| 14 |
if($pid==0) { |
| 15 |
chdir $dir or &bad_mount($dir,$!); |
| 16 |
if($writemode and exists($mountmodes{$dir}->{"rw"})) { |
| 17 |
- open X,"> $dir/.nfscheck" or exit $?; |
| 18 |
+ my $check_filename="$dir/.nfscheck_" . hostname; |
| 19 |
+ open X,"> $check_filename" or exit $?; |
| 20 |
print X $ENV{HOSTNAME}."\n".localtime()."\n"; # XXX Full disk may fail.. |
| 21 |
close X or exit $?; |
| 22 |
} |