Blame SOURCES/nfs-utils_env.sh

4f2874
#!/bin/sh
4f2874
4f2874
#
4f2874
# Extract configuration from /etc/sysconfig/nfs and write
4f2874
# environment variables to /run/sysconfig/nfs-utils to be 
4f2874
# used by the systemd nfs-config service
4f2874
#
4f2874
4f2874
nfs_config=/etc/sysconfig/nfs
4f2874
if test -r $nfs_config; then
4f2874
    . $nfs_config
4f2874
fi
4f2874
5fd2c0
[ -n "$LOCKDARG" ] && /sbin/modprobe lockd $LOCKDARG
5fd2c0
if [ -n "$LOCKD_TCPPORT" -o -n "$LOCKD_UDPPORT" ]; then
5fd2c0
	[ -z "$LOCKDARG" ] && /sbin/modprobe lockd $LOCKDARG
5fd2c0
	[ -n "$LOCKD_TCPPORT" ] && \
5fd2c0
		/sbin/sysctl -w fs.nfs.nlm_tcpport=$LOCKD_TCPPORT >/dev/null 2>&1
5fd2c0
	[ -n "$LOCKD_UDPPORT" ] && \
5fd2c0
		/sbin/sysctl -w fs.nfs.nlm_udpport=$LOCKD_UDPPORT >/dev/null 2>&1
5fd2c0
fi
5fd2c0
d2edb4
if [ -n "$MOUNTD_PORT" ]; then
d2edb4
	RPCMOUNTDOPTS="$RPCMOUNTDOPTS -p $MOUNTD_PORT"
d2edb4
fi
d2edb4
d2edb4
if [ -n "$STATD_PORT" ]; then
d2edb4
	STATDARG="$STATDARG -p $STATD_PORT"
d2edb4
fi
d2edb4
d2edb4
if [ -n "$STATD_OUTGOING_PORT" ]; then
d2edb4
	STATDARG="$STATDARG -o $STATD_OUTGOING_PORT"
d2edb4
fi
d2edb4
d2edb4
if [ -n "$STATD_HA_CALLOUT" ]; then
d2edb4
	STATDARG="$STATDARG -H $STATD_HA_CALLOUT"
d2edb4
fi
d2edb4
4f2874
if [ -n "$NFSD_V4_GRACE" ]; then
4f2874
	grace="-G $NFSD_V4_GRACE"
4f2874
fi
4f2874
4f2874
if [ -n "$NFSD_V4_LEASE" ]; then
4f2874
	lease="-L $NFSD_V4_LEASE"
4f2874
fi
4f2874
4f2874
if [ -n "$RPCNFSDCOUNT" ]; then
4f2874
    nfsds=$RPCNFSDCOUNT
4f2874
fi
4f2874
4f2874
if [ -n "$RPCNFSDARGS" ]; then
4f2874
	nfsdargs="$RPCNFSDARGS $grace $lease $nfsds"
4f2874
else
4f2874
	nfsdargs="$grace $lease $nfsds"
4f2874
fi
4f2874
4f2874
mkdir -p /run/sysconfig
4f2874
{
4f2874
echo RPCNFSDARGS=\"$nfsdargs\"
4f2874
echo RPCMOUNTDARGS=\"$RPCMOUNTDOPTS\"
4f2874
echo STATDARGS=\"$STATDARG\"
4f2874
echo SMNOTIFYARGS=\"$SMNOTIFYARGS\"
4f2874
echo RPCIDMAPDARGS=\"$RPCIDMAPDARGS\"
4f2874
echo GSSDARGS=\"$RPCGSSDARGS\"
4f2874
echo BLKMAPDARGS=\"$BLKMAPDARGS\"
4f2874
echo GSS_USE_PROXY=\"$GSS_USE_PROXY\"
4f2874
} > /run/sysconfig/nfs-utils