From a3298265f8c86eb022d1bfb8e6748e0184c4e41fb0303b734a8eefd5f69c7de7 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Thu, 13 Aug 2015 23:45:51 +0000 Subject: [PATCH] Update sysconfig setting to match SLES - sysconfig.nfs: add STATD_PORT, STATD_HOSTNAME, LOCKD_TCPPORT, LOCKD_UDPPORT - nfs-utils-env.sh: handle STATD_PORT, STATD_HOSTNAME, LOCKD_TCPPORT, LOCKD_UDPPORT Also handle NFSV4LEASETIME, which was missing. (bsc#941645) OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=139 --- nfs-utils.changes | 11 +++++++++ nfs-utils_env.sh | 20 +++++++++++++++- sysconfig.nfs | 60 +++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 88 insertions(+), 3 deletions(-) diff --git a/nfs-utils.changes b/nfs-utils.changes index 77d977a..af96b17 100644 --- a/nfs-utils.changes +++ b/nfs-utils.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu Aug 13 02:36:16 UTC 2015 - nfbrown@suse.com + +- sysconfig.nfs: add STATD_PORT, STATD_HOSTNAME, + LOCKD_TCPPORT, LOCKD_UDPPORT +- nfs-utils-env.sh: handle STATD_PORT, STATD_HOSTNAME, + LOCKD_TCPPORT, LOCKD_UDPPORT + Also handle NFSV4LEASETIME, which was missing. + + (bsc#941645) + ------------------------------------------------------------------- Mon Aug 10 04:28:42 UTC 2015 - nfbrown@suse.com diff --git a/nfs-utils_env.sh b/nfs-utils_env.sh index 37fba93..bd2e01e 100644 --- a/nfs-utils_env.sh +++ b/nfs-utils_env.sh @@ -44,6 +44,24 @@ else threads=3 fi +time_params= +if [ -n "$NFSV4LEASETIME" ]; then + time_params="--grace-time=$NFSV4LEASETIME --lease-time=$NFSV4LEASETIME" +fi + +if [ -n "$STATD_PORT" ]; then + STATD_OPTIONS="$STATD_OPTIONS -p $STATD_PORT" +fi +if [ -n "$STATD_HOSTNAME" ]; then + STATD_OPTIONS="$STATD_OPTIONS -n $STATD_HOSTNAME" +fi +if [ -n "$LOCKD_TCPPORT" ]; then + STATD_OPTIONS="$STATD_OPTIONS --nlm-port $LOCKD_TCPPORT" +fi +if [ -n "$LOCKD_UDPPORT" ]; then + STATD_OPTIONS="$STATD_OPTIONS --nlm-udp-port $LOCKD_UDPPORT" +fi + case $NFS_GSSD_AVOID_DNS in [Nn]*) ignore_dns=-D ;; [Yy]*) ignore_dns= ;; @@ -54,7 +72,7 @@ mkdir -p /run/sysconfig { echo "RPCIDMAPDARGS=$pipefs" echo "RPCMOUNTDARGS=$mountdport $MOUNTD_OPTIONS $version_parms" -echo "RPCNFSDARGS=$NFSD_OPTIONS $version_params $threads" +echo "RPCNFSDARGS=$NFSD_OPTIONS $version_params $time_params $threads" echo "GSSDARGS=$ignore_dns $GSSD_OPTIONS $pipefs" echo "SMNOTIFYARGS=$SM_NOTIFY_OPTIONS" echo "STATDARGS=$STATD_OPTIONS" diff --git a/sysconfig.nfs b/sysconfig.nfs index 97b7020..ae9049b 100644 --- a/sysconfig.nfs +++ b/sysconfig.nfs @@ -89,6 +89,59 @@ SM_NOTIFY_OPTIONS="" # NFS_START_SERVICES="yes" +## Path: Network/File systems/NFS server +## Description: Port rpc.statd should listen on +## Type: integer +## Default: "" +## ServiceRestart: nfsserver +# +# Statd will normally choose a random port to listen on and +# SuSE-Firewall is able to detect which port and allow for it. +# If you have another firewall, you may want to set a fixed +# port number which can then be opened in that firewall. +STATD_PORT="" + +## Path: Network/File systems/NFS server +## Description: Hostname used by rpc.statd +## Type: string +## Default: "" +## ServiceRestart: nfsserver +# +# statd will normally use the system hostname in status +# monitoring conversations with other hosts. If a different +# host name should be used, as can be useful with fail-over +# configurations, that name should be given here. +# +STATD_HOSTNAME="" + +## Path: Network/File systems/NFS server +## Description: TCP Port that lockd should listen on +## Type: integer +## Default: "" +## ServiceRestart: nfsserver +# +# Lockd will normally choose a random port to listen on and +# SuSE-Firewall is able to detect which port and allow for it. +# If you have another firewall, you may want to set a fixed +# port number which can then be opened in that firewall. +# lockd opens a UDP and a TCP port. This setting only affect +# the TCP port. +LOCKD_TCPPORT="" + +## Path: Network/File systems/NFS server +## Description: UDP Port that lockd should listen on +## Type: integer +## Default: "" +## ServiceRestart: nfsserver +# +# Lockd will normally choose a random port to listen on and +# SuSE-Firewall is able to detect which port and allow for it. +# If you have another firewall, you may want to set a fixed +# port number which can then be opened in that firewall. +# lockd opens a UDP and a TCP port. This setting only affect +# the UDP port. +LOCKD_UDPPORT="" + ## Path: Network/File systems/NFS server ## Description: Command line parameters for rpc.statd ## Type: string @@ -161,8 +214,11 @@ GSSD_OPTIONS="" ## Type: string ## Default: "" # -# This setting allows extra options to be specified for rpc.mountd, -# such as --manage-gids. +# Normally mountd does not require any options. In some circumstances, +# -n, -t, -g or other options might be useful. See "man 8 rpc.mountd" for +# details. Those options can be set here. +# -p or -N should be set using MOUNTD_PORT or NFS4_SUPPORT rather than +# this option. MOUNTD_OPTIONS="" ## Path: Network/File systems/NFS server