Store files to Xymon's tmp dir (with var XYMONTMP)
This commit is contained in:
parent
e55b2d990f
commit
4d90168df5
|
@ -13,7 +13,7 @@ use Data::Dumper;
|
||||||
|
|
||||||
my $bb = new Hobbit('smart');
|
my $bb = new Hobbit('smart');
|
||||||
|
|
||||||
my $temp_disk_list = "/tmp/smart.drivedb.list";
|
my $temp_disk_list = "$ENV{'XYMONTMP'}/$ENV{'MACHINEDOTS'}.smart.drivedb.list";
|
||||||
my @disks = ();
|
my @disks = ();
|
||||||
my %olderr = {};
|
my %olderr = {};
|
||||||
|
|
||||||
|
@ -36,8 +36,8 @@ if (-e $temp_disk_list) {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# Create a file with the list of disks
|
# Create a file with the list of disks
|
||||||
system("ls -1 /dev/sd* | grep -vE '[0-9]' > /tmp/smart.drivedb.list") == 0
|
system("ls -1 /dev/sd* | grep -vE '[0-9]' > $temp_disk_list") == 0
|
||||||
or die "system command to create smart.drivedb.list failed: $?";
|
or die "system command to create $temp_disk_list failed: $?";
|
||||||
}
|
}
|
||||||
|
|
||||||
# fallback to disk detection if nothing defined in the config
|
# fallback to disk detection if nothing defined in the config
|
||||||
|
|
Loading…
Reference in New Issue