aboutsummaryrefslogtreecommitdiffstats
path: root/packages/freenas
diff options
context:
space:
mode:
Diffstat (limited to 'packages/freenas')
-rw-r--r--packages/freenas/pkg/freenas_services.inc12
1 files changed, 4 insertions, 8 deletions
diff --git a/packages/freenas/pkg/freenas_services.inc b/packages/freenas/pkg/freenas_services.inc
index 8d6f1940..184be1ec 100644
--- a/packages/freenas/pkg/freenas_services.inc
+++ b/packages/freenas/pkg/freenas_services.inc
@@ -417,17 +417,13 @@ function services_nfs_configure() {
$a_mount = &$freenas_config['mounts']['mount'];
foreach ($a_mount as $mount) {
+ /* -mapall and -maproot mutually exclusive */
+ $mapping = $freenas_config['nfs']['mapall'] == "yes" ? "-mapall=root" : "-maproot=root";
+
$nfsconf .= <<<EOD
-/mnt/{$mount['sharename']} -alldirs -maproot=root
-EOD;
-
- if ($freenas_config['nfs']['mapall'] == "yes") {
- $nfsconf .= <<<EOD
--mapall=root
+/mnt/{$mount['sharename']} -alldirs {$mapping}
EOD;
- }
-
$nfsconf .= <<<EOD
-network {$network} -mask $subnet