]> git.datanom.net - omvzfs.git/commitdiff
Add option to set mountpoint when creating pool.
authorNiclas Berglind <nb@kjam.se>
Sat, 13 Sep 2014 06:58:39 +0000 (08:58 +0200)
committerMichael Rasmussen <mir@datanom.net>
Sat, 13 Sep 2014 12:18:55 +0000 (14:18 +0200)
Signed-off-by: Niclas Berglind <nb@kjam.se>
gui/js/omv/module/admin/storage/zfs/Overview.js
gui/rpc/zfs.inc

index 22f74dbf3f97235e374268accdf870bec91870bb..f2357996f754cd0d11cacb49b891ec4bfca062a8 100644 (file)
@@ -136,6 +136,14 @@ Ext.define("OMV.module.admin.storage.zfs.AddPool", {
                                        flex: 1
                                }]
                        }
+               },{
+                       xtype: "textfield",
+                       name: "mountpoint",
+                       fieldLabel: _("Mountpoint"),
+                       plugins: [{
+                               ptype: "fieldinfo",
+                               text: _("Optional mountpoint for the pool. Default is to use pool name.")
+                       }]
                },{
                        xtype: "checkbox",
                        name: "force",
index 3bc3ec117d4fca266e5b056add8f5eb38dfc8aff..16b5a133183afa56dc2a56a2ac8256a6be0d5bdb 100644 (file)
@@ -59,6 +59,10 @@ class OMVRpcServiceZFS extends OMVRpcServiceAbstract {
                if ($params['force']) {
                        $opts .= "-f ";
                }
+               if (strlen($params['mountpoint']) > 0) {
+                       $opts .= "-m " . $params['mountpoint'] . " ";
+               }
+
                $disks = preg_split("/[,;]/", $params['devices']);
                $vdev = new OMVModuleZFSVdev($params['name'], $pooltype, $disks);
                $pool = new OMVModuleZFSZpool($vdev, $opts);
This page took 0.032836 seconds and 5 git commands to generate.