mirror of
https://github.com/webmin/webmin.git
synced 2026-06-22 12:10:28 +01:00
Add an opt-in SMART module config option for manually listing hardware RAID passthrough devices, expose configured physical disks to smartctl, and document the option. https://github.com/webmin/webmin/issues/1704
21 lines
381 B
Raku
21 lines
381 B
Raku
sub show_raid_devices
|
|
{
|
|
my ($value) = @_;
|
|
$value ||= "";
|
|
$value =~ s/\t/\n/g;
|
|
my $placeholder = "e_escape("/dev/sg0 cciss 0 3");
|
|
return &ui_textarea("raid_devices", $value, 3, 60, undef, 0,
|
|
"placeholder=\"$placeholder\"");
|
|
}
|
|
|
|
sub parse_raid_devices
|
|
{
|
|
my $value = $in{'raid_devices'} || "";
|
|
$value =~ s/\r//g;
|
|
$value =~ s/\n/\t/g;
|
|
$value =~ s/\s+$//;
|
|
return $value;
|
|
}
|
|
|
|
1;
|