mirror of
https://github.com/webmin/webmin.git
synced 2026-11-03 09:01:01 +00:00
Fix optional RAID handling in LVM and partition modules
This commit is contained in:
@@ -2,7 +2,7 @@ name=Partition Manager
|
||||
category=hardware
|
||||
os_support=*-linux
|
||||
desc=Partitions on Local Disks
|
||||
depends=mount proc raid
|
||||
depends=mount proc
|
||||
longdesc=Create and edit partitions on local SCSI, IDE and SATA disks on Linux.
|
||||
novserver=1
|
||||
noopenvz=1
|
||||
|
||||
@@ -934,13 +934,15 @@ foreach $d (&fdisk::list_disks_partitions()) {
|
||||
}
|
||||
}
|
||||
|
||||
# Show available RAID devices
|
||||
local $conf = &raid::get_raidtab();
|
||||
foreach $c (@$conf) {
|
||||
next if ($used{$c->{'value'}});
|
||||
local @ds = &device_status($c->{'value'});
|
||||
next if (@ds);
|
||||
push(@opts, [ $c->{'value'}, &text('pv_raid', $c->{'value'} =~ /md(\d+)$/ ? "$1" : $c->{'value'}) ]);
|
||||
# Show available RAID devices when the module is installed
|
||||
if ($has_raid) {
|
||||
local $conf = &raid::get_raidtab();
|
||||
foreach $c (@$conf) {
|
||||
next if ($used{$c->{'value'}});
|
||||
local @ds = &device_status($c->{'value'});
|
||||
next if (@ds);
|
||||
push(@opts, [ $c->{'value'}, &text('pv_raid', $c->{'value'} =~ /md(\d+)$/ ? "$1" : $c->{'value'}) ]);
|
||||
}
|
||||
}
|
||||
|
||||
push(@opts, [ '', $text{'pv_other'} ]);
|
||||
|
||||
Reference in New Issue
Block a user