2014-03-25 16:36:54 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# extract configuration from /etc/sysconfig/nfs-utils and write
|
|
|
|
# environment to /run/sysconfig/nfs-utils to be used by systemd unit
|
|
|
|
# files.
|
|
|
|
|
|
|
|
nfs_config=/etc/sysconfig/nfs
|
|
|
|
if test -r $nfs_config; then
|
|
|
|
. $nfs_config
|
|
|
|
fi
|
|
|
|
|
2014-12-14 16:54:39 +00:00
|
|
|
[ -n "$LOCKDARG" ] && /sbin/modprobe lockd $LOCKDARG
|
|
|
|
if [ -n "$LOCKD_TCPPORT" -o -n "$LOCKD_UDPPORT" ]; then
|
|
|
|
[ -z "$LOCKDARG" ] && /sbin/modprobe lockd $LOCKDARG
|
|
|
|
[ -n "$LOCKD_TCPPORT" ] && \
|
|
|
|
/sbin/sysctl -w fs.nfs.nlm_tcpport=$LOCKD_TCPPORT >/dev/null 2>&1
|
|
|
|
[ -n "$LOCKD_UDPPORT" ] && \
|
|
|
|
/sbin/sysctl -w fs.nfs.nlm_udpport=$LOCKD_UDPPORT >/dev/null 2>&1
|
|
|
|
fi
|
|
|
|
|
2015-01-02 13:35:31 +00:00
|
|
|
if [ -n "$NFSD_V4_GRACE" ]; then
|
2014-12-14 16:54:39 +00:00
|
|
|
grace="-G $NFSD_V4_GRACE"
|
|
|
|
fi
|
|
|
|
|
2015-01-02 13:35:31 +00:00
|
|
|
if [ -n "$NFSD_V4_LEASE" ]; then
|
2014-12-14 16:54:39 +00:00
|
|
|
lease="-L $NFSD_V4_LEASE"
|
|
|
|
fi
|
|
|
|
|
2015-01-02 13:35:31 +00:00
|
|
|
if [ -n "$RPCNFSDCOUNT" ]; then
|
2014-03-25 16:36:54 +00:00
|
|
|
nfsds=$RPCNFSDCOUNT
|
|
|
|
else
|
|
|
|
nfsds=8
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$RPCNFSDARGS" ]; then
|
2014-12-14 16:54:39 +00:00
|
|
|
nfsdargs="$RPCNFSDARGS $grace $lease $nfsds "
|
2014-03-25 16:36:54 +00:00
|
|
|
else
|
2014-12-14 16:54:39 +00:00
|
|
|
nfsdargs="$grace $lease $nfsds "
|
2014-03-25 16:36:54 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p /run/sysconfig
|
|
|
|
{
|
|
|
|
echo RPCNFSDARGS="$nfsdargs"
|
2014-12-03 22:21:07 +00:00
|
|
|
echo RPCMOUNTDARGS="$RPCMOUNTDOPTS"
|
|
|
|
echo STATDARGS="$STATDARG"
|
2015-01-15 10:49:38 +00:00
|
|
|
echo SMNOTIFYARGS="$SMNOTIFYARGS"
|
2014-03-25 16:36:54 +00:00
|
|
|
echo RPCIDMAPDARGS="$RPCIDMAPDARGS"
|
|
|
|
echo RPCGSSDARGS="$RPCGSSDARGS"
|
|
|
|
echo RPCSVCGSSDARGS="$RPCSVCGSSDARGS"
|
|
|
|
echo BLKMAPDARGS="$BLKMAPDARGS"
|
|
|
|
} > /run/sysconfig/nfs-utils
|