]> git.datanom.net - omvzfs.git/commitdiff
Last commit introduced new issues.
authorNiclas Berglind <nb@kjam.se>
Thu, 11 Sep 2014 20:20:34 +0000 (22:20 +0200)
committerMichael Rasmussen <mir@datanom.net>
Thu, 11 Sep 2014 21:29:10 +0000 (23:29 +0200)
Signed-off-by: Niclas Berglind <nb@kjam.se>
src/Utils.php

index 978901e18d44d118827db44896976e46daf7e8a0..8dba1fe134a6303c61cf26ddaaa2b0da7736fdbb 100644 (file)
@@ -46,9 +46,16 @@ class OMVModuleZFSUtil {
                        $pooluuid = OMVModuleZFSUtil::getUUIDbyName($name);
                        if (isset($pooluuid)) {
                                $pooluuid = "UUID=" . $pooluuid;
-                               $xpath = "//system/fstab/mntent[fsname=" . $pooluuid . "]";
+                               $xpath = "//system/fstab/mntent";
                                $object = $xmlConfig->get($xpath);
-                               if(is_null($object)) {
+                               $uuidexists = false;
+                               foreach ($object as $obj) {
+                                       if (strcmp($pooluuid, $obj['fsname']) === 0) {
+                                               $uuidexists = true;
+                                               break;
+                                       }
+                               }
+                               if (!$uuidexists) {
                                        $uuid = OMVUtil::uuid();
                                        $ds = new OMVModuleZFSDataset($name);
                                        $dir = $ds->getMountPoint();
This page took 0.031201 seconds and 5 git commands to generate.