Try both upper and lower case P flags https://www.virtualmin.com/node/44318

This commit is contained in:
Jamie Cameron
2016-11-28 15:01:32 -08:00
parent 3e592861d4
commit c51b7ca4fd

View File

@@ -304,7 +304,7 @@ my %donedevno;
# Get list of zone pools
my %zpools = ( 'zones' => 1, 'zroot' => 1 );
if (&has_command("zpool")) {
my @out = &backquote_command("zpool list -P");
my @out = &backquote_command("zpool list -P || zpool list -p");
foreach my $l (@out) {
if (/^(\S+)\s+(\d+)\s+(\d+)\s+(\d+)/) {
$zpools{$1} = [ $2 / 1024, $4 / 1024 ];