* @throws OMVModuleZFSException
*/
- public function __construct($vdev) {
+ public function __construct($vdev, $opts = "") {
$create_pool = true;
if (is_array($vdev)) {
$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)
* @param string $attribute
* @return string value
*/
- private function getAttribute($attribute) {
+ public function getAttribute($attribute) {
$cmd = "zpool list -H -o $attribute {$this->name}";
OMVUtil::exec($cmd, $output, $result);
if ($result) {
$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