Skip to content
Snippets Groups Projects
Commit 631db87f authored by Sergey Joseph Ivanov's avatar Sergey Joseph Ivanov
Browse files

fixing merge of megaraid code to Core::SMART

parent 3fee32b1
No related branches found
No related tags found
No related merge requests found
......@@ -94,13 +94,8 @@ sub handler {
$disk = "/dev/$disk_name" if ($^O eq "linux") || ($^O =~ /bsd/) ;
$disk = "/dev/rdsk/$disk_name" if $^O eq "solaris";
my $smartctl_cmd = $config->{smartctl_cmd} || "/usr/sbin/smartctl";
my $smartctl_args = "-i";
if (defined ($megaraid_number)) {
$smartctl_args .= " -a -H -d megaraid,$megaraid_number";
}
else {
$smartctl_args .= " -A";
}
my $smartctl_args = "-i -a";
$smartctl_args .= " -H -d megaraid,$megaraid_number" if (defined ($megaraid_number));
$smartctl_args = "$smartctl_args $config->{smartctl_args}" if $config->{smartctl_args};
my $smartdata = {};
my $output = run_command("$smartctl_cmd $smartctl_args $disk");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment