mirror of
https://github.com/webmin/webmin.git
synced 2026-05-04 22:30:33 +01:00
Handle new LVM output format https://www.virtualmin.com/node/21501
This commit is contained in:
@@ -297,12 +297,15 @@ else {
|
||||
open(DISPLAY, "lvdisplay -m 2>/dev/null |");
|
||||
while(<DISPLAY>) {
|
||||
s/\r|\n//g;
|
||||
if (/LV\s+Name\s+(.*\/(\S+))/i) {
|
||||
$lv = { 'name' => $2,
|
||||
'device' => $1,
|
||||
if (/LV\s+(Name|Path)\s+(.*\/(\S+))/i) {
|
||||
$lv = { 'name' => $3,
|
||||
'device' => $2,
|
||||
'number' => scalar(@rv) };
|
||||
push(@rv, $lv);
|
||||
}
|
||||
elsif (/LV\s+Name\s+[^\/]/) {
|
||||
# Ignore this, as we got the name from LV Path line
|
||||
}
|
||||
elsif (/VG\s+Name\s+(.*)/) {
|
||||
$lv->{'vg'} = $1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user