- //Check if the UUID is already stored as an mntent object. If it isn't then create it.
- $xpath = "//system/fstab/mntent[fsname=" . $pooluuid . "]";
- $object = $xmlConfig->get($xpath);
- if(is_null($object)) {
- $uuid = OMVUtil::uuid();
- $ds = new OMVModuleZFSDataset($poolname);
- $dir = $ds->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);
- }
-