From 4d90168df58f377e6ca6da591d45bff8e06397cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Fri, 28 Feb 2020 14:30:44 +0100 Subject: [PATCH] Store files to Xymon's tmp dir (with var XYMONTMP) --- xymon/plugins/client/ext/smart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xymon/plugins/client/ext/smart b/xymon/plugins/client/ext/smart index bef16f1..66bb245 100755 --- a/xymon/plugins/client/ext/smart +++ b/xymon/plugins/client/ext/smart @@ -13,7 +13,7 @@ use Data::Dumper; 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 %olderr = {}; @@ -36,8 +36,8 @@ if (-e $temp_disk_list) { } else { # Create a file with the list of disks - system("ls -1 /dev/sd* | grep -vE '[0-9]' > /tmp/smart.drivedb.list") == 0 - or die "system command to create smart.drivedb.list failed: $?"; + system("ls -1 /dev/sd* | grep -vE '[0-9]' > $temp_disk_list") == 0 + or die "system command to create $temp_disk_list failed: $?"; } # fallback to disk detection if nothing defined in the config