diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2015-11-30 22:29:11 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2015-11-30 22:29:11 +0000 |
commit | 2cbb9ff22a403d9ec316a519280c8fb9a3d24af3 (patch) | |
tree | d3ff56110403fcfa78edf2ca56acbfc900d7bf19 /etc/rc.d | |
parent | 82acf73e2b018069fa47ee237d704433859a2922 (diff) | |
download | FreeBSD-src-2cbb9ff22a403d9ec316a519280c8fb9a3d24af3.zip FreeBSD-src-2cbb9ff22a403d9ec316a519280c8fb9a3d24af3.tar.gz |
Add support for the new "-manage-gids" option for the nfsuserd daemon
to the rc scripts. With these changes, setting nfs_server_managegids="YES"
in /etc/rc.conf will enable this capability.
Suggested by: jpaetzel
Tested by: jpaetzel
Reviewed by: rc (pending)
MFC after: 2 weeks
Diffstat (limited to 'etc/rc.d')
-rwxr-xr-x | etc/rc.d/nfsd | 6 | ||||
-rwxr-xr-x | etc/rc.d/nfsuserd | 9 |
2 files changed, 14 insertions, 1 deletions
diff --git a/etc/rc.d/nfsd b/etc/rc.d/nfsd index 8c67308..fefe390 100755 --- a/etc/rc.d/nfsd +++ b/etc/rc.d/nfsd @@ -32,9 +32,13 @@ nfsd_precmd() sysctl vfs.nfsd.nfs_privport=0 > /dev/null fi + if checkyesno nfsv4_server_enable || \ + checkyesno nfs_server_managegids; then + force_depend nfsuserd || err 1 "Cannot run nfsuserd" + fi + if checkyesno nfsv4_server_enable; then sysctl vfs.nfsd.server_max_nfsvers=4 > /dev/null - force_depend nfsuserd || err 1 "Cannot run nfsuserd" else echo 'NFSv4 is disabled' sysctl vfs.nfsd.server_max_nfsvers=3 > /dev/null diff --git a/etc/rc.d/nfsuserd b/etc/rc.d/nfsuserd index 52246bb..d98d16e 100755 --- a/etc/rc.d/nfsuserd +++ b/etc/rc.d/nfsuserd @@ -15,5 +15,14 @@ command="/usr/sbin/${name}" sig_stop="USR1" load_rc_config $name +start_precmd="nfsuserd_precmd" + +nfsuserd_precmd() +{ + if checkyesno nfs_server_managegids; then + rc_flags="-manage-gids ${nfsuserd_flags}" + fi + return 0 +} run_rc_command "$1" |