- foreach($out as $line) {
- if(preg_match('/^.*LABEL=\"' . $name . '\" UUID=\"([A-Za-z0-9]+)\".*TYPE=\"zfs_member\"$/', $line, $result)) {
- return($result[1]);
+ foreach($out as $name) {
+ $pooluuid = OMVModuleZFSUtil::getUUIDbyName($name);
+ $xpath = "//system/fstab/mntent[fsname=" . $pooluuid . "]";
+ $mountpoint = $xmlConfig->get($xpath);
+ if (is_null($mountpoint)) {
+ $uuid = OMVUtil::uuid();
+ $pool = new OMVModuleZFSZpool($name);
+ $dir = $pool->getMountPoint();
+ $object = array(
+ "uuid" => $uuid,
+ "fsname" => $pooluuid,
+ "dir" => $dir,
+ "type" => "zfs",
+ "opts" => "rw,relatime,xattr",
+ "freq" => "0",
+ "passno" => "2"
+ );
+ $xmlConfig->set("//system/fstab",array("mntent" => $object));
+ $dispatcher = &OMVNotifyDispatcher::getInstance();
+ $dispatcher->notify(OMV_NOTIFY_CREATE,"org.openmediavault.system.fstab.mntent", $object);