X-Git-Url: http://git.datanom.net/omvzfs.git/blobdiff_plain/cf4e471d86e8b05678e56f58a44212a43a6f9c82..ecee099b4e06ee713f501ad07047b76ee145496a:/src/Zpool.php diff --git a/src/Zpool.php b/src/Zpool.php index 41fd052..6c06e3d 100644 --- a/src/Zpool.php +++ b/src/Zpool.php @@ -122,7 +122,7 @@ class OMVModuleZFSZpool extends OMVModuleAbstract { * @throws OMVModuleZFSException */ - public function __construct($vdev) { + public function __construct($vdev, $opts = "") { $create_pool = true; if (is_array($vdev)) { @@ -144,7 +144,7 @@ class OMVModuleZFSZpool extends OMVModuleAbstract { $this->cache = null; $this->features = array(); if ($create_pool) { - $cmd = "zpool create $name $cmd 2>&1"; + $cmd = "zpool create $opts$name $cmd 2>&1"; OMVUtil::exec($cmd, $output, $result); if ($result) @@ -753,7 +753,7 @@ class OMVModuleZFSZpool extends OMVModuleAbstract { $dev = null; } $type = $match[1]; - } else if (preg_match("/^\s*([\w\d-]+)\s+/", $line, $match)) { + } else if (preg_match("/^\s*([\w\d-a-z0-9\:\.\-]+)\s+/", $line, $match)) { if ($dev) $dev .= " $match[1]"; else