diff options
author | Sean Eric Fagan <sef@FreeBSD.org> | 2019-02-16 00:15:54 +0000 |
---|---|---|
committer | Sean Eric Fagan <sef@FreeBSD.org> | 2019-02-16 00:15:54 +0000 |
commit | 025816d9cecee9c9dc18bd4ef46b6ed7554d6cfc (patch) | |
tree | 7f02cb33d4db772a64265c652967dc7a52fe0388 /libexec | |
parent | 95e310720d7fd41ef9ad254382b249a7ea6a75f7 (diff) | |
download | src-test2-025816d9cecee9c9dc18bd4ef46b6ed7554d6cfc.tar.gz src-test2-025816d9cecee9c9dc18bd4ef46b6ed7554d6cfc.zip |
Add support for a virtual hostname to nfsd
Specifically, this allows (via "-V vhostname") telling nfsd what principal
to use, instead of the hostname. This is used at iXsystems for fail-over in
HA systems.
Reviewed by: macklem
Sponsored by: iXsystems Inc.
Differential Revision: https://reviews.freebsd.org/D19191
Notes
Notes:
svn path=/head/; revision=344192
Diffstat (limited to 'libexec')
-rwxr-xr-x | libexec/rc/rc.d/nfsd | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libexec/rc/rc.d/nfsd b/libexec/rc/rc.d/nfsd index 33ad356e05e9..3c16416f23d9 100755 --- a/libexec/rc/rc.d/nfsd +++ b/libexec/rc/rc.d/nfsd @@ -13,6 +13,7 @@ name="nfsd" desc="Remote NFS server" rcvar="nfs_server_enable" command="/usr/sbin/${name}" +nfs_server_vhost="" load_rc_config $name start_precmd="nfsd_precmd" @@ -20,6 +21,7 @@ sig_stop="USR1" nfsd_precmd() { + local _vhost rc_flags="${nfs_server_flags}" # Load the modules now, so that the vfs.nfsd sysctl @@ -46,6 +48,9 @@ nfsd_precmd() force_depend rpcbind || return 1 force_depend mountd || return 1 + if [ -n "${nfs_server_vhost}" ]; then + command_args="-V \"${nfs_server_vhost}\"" + fi } run_rc_command "$1" |