nfs-utils/nfs-utils_env.sh
Steve Dickson 78e3951b26 Fix typo in nfs-utils_env.sh (bz 1516004)
Signed-off-by: Steve Dickson <steved@redhat.com>
2017-12-19 12:53:00 -05:00

46 lines
961 B
Bash

#!/bin/sh
#
# Extract configuration from /etc/sysconfig/nfs and write
# environment variables to /run/sysconfig/nfs-utils to be
# used by systemd nfs-config service
#
nfs_config=/etc/sysconfig/nfs
if test -r $nfs_config; then
. $nfs_config
fi
if [ -n "$NFSD_V4_GRACE" ]; then
grace="-G $NFSD_V4_GRACE"
fi
if [ -n "$NFSD_V4_LEASE" ]; then
lease="-L $NFSD_V4_LEASE"
fi
if [ -n "$RPCNFSDCOUNT" ]; then
nfsds=$RPCNFSDCOUNT
else
nfsds=8
fi
if [ -n "$RPCNFSDARGS" ]; then
nfsdargs="$RPCNFSDARGS $grace $lease $nfsds"
else
nfsdargs="$grace $lease $nfsds"
fi
mkdir -p /run/sysconfig
{
echo RPCNFSDARGS=\"$nfsdargs\"
echo RPCMOUNTDARGS=\"$RPCMOUNTDOPTS\"
echo STATDARGS=\"$STATDARGS\"
echo SMNOTIFYARGS=\"$SMNOTIFYARGS\"
echo RPCIDMAPDARGS=\"$RPCIDMAPDARGS\"
echo RPCGSSDARGS=\"$RPCGSSDARGS\"
echo RPCSVCGSSDARGS=\"$RPCSVCGSSDARGS\"
echo BLKMAPDARGS=\"$BLKMAPDARGS\"
echo GSS_USE_PROXY=\"$GSS_USE_PROXY\"
} > /run/sysconfig/nfs-utils