# Check that networking is up.
#[ ${NETWORKING} = "no" ] && exit ${EXIT_CODE_WARNING}
+# Check if NFS server functionality is desired
+if [ "x${NFS_SERVER_ENA}" != "xyes" -a "x${NFS_SERVER_ENA}" != "xYes" -a "x${NFS_SERVER_ENA}" != "xYES" ]; then
+ exit ${EXIT_CODE_SUCCESS}
+fi
+
# Check for presence of executables
-if [ ! -x /usr/sbin/rpc.nfsd ]; then
+if [ ! -x /sbin/rpc.nfsd ]; then
echo "Missing rpc.nfsd executable"
exit ${EXIT_CODE_WARNING}
fi
-if [ ! -x /usr/sbin/rpc.mountd ]; then
+if [ ! -x /sbin/rpc.mountd ]; then
echo "Missing rpc.mountd executable"
exit ${EXIT_CODE_WARNING}
fi
-if [ ! -x /usr/sbin/exportfs ]; then
+if [ ! -x /sbin/exportfs ]; then
echo "Missing exportfs executable"
exit ${EXIT_CODE_WARNING}
fi
exit ${EXIT_CODE_WARNING}
fi
-if [ "x${NFS_SERVER_ENA}" != "xyes" -a "x${NFS_SERVER_ENA}" != "xYes" -a "x${NFS_SERVER_ENA}" != "xYES" ]; then
- msg_log "NFS server disabled in '/etc/sysconfig/network/network-parameters'"
- exit ${EXIT_CODE_WARNING}
-fi
-
# Check for and source configuration file otherwise set defaults
# TUNE_QUEUE: controls whether to up the size of input queues
[ -f /etc/sysconfig/network/nfs ] && . /etc/sysconfig/network/nfs
/sbin/sysctl -w net.core.rmem_default=$NFSD_QS >/dev/null 2>&1
/sbin/sysctl -w net.core.rmem_max=$NFSD_QS >/dev/null 2>&1
fi
- cmd_run_log_box "Starting NFS services" loadproc /usr/sbin/exportfs -ra
+ cmd_run_log_box "Starting NFS services" loadproc /sbin/exportfs -ra
if [ -n "$RQUOTAD" -a "$RQUOTAD" != "no" ]; then
cmd_run_log_box "Starting NFS quotas" loadproc rpc.rquotad
fi
cmd_run_log_box "Starting NFS daemon" loadproc rpc.nfsd $NFSDCOUNT
-
+
[ -n "$MOUNTD_PORT" ] \
&& MOUNTD_OPTIONS="$MOUNTD_OPTIONS -p $MOUNTD_PORT"
[ "$MOUNTD_TCP" = "no" -o "$MOUNTD_TCP" = "NO" ] \
&& MOUNTD_OPTIONS="$MOUNTD_OPTIONS --no-tcp"
-
+
cmd_run_log_box "Starting NFS mountd" loadproc rpc.mountd $MOUNTD_OPTIONS
-
+
touch /var/lock/subsys/nfs
# reset input queue for rest of network services
if [ "$TUNE_QUEUE" = "yes" ]; then
# Do it the last so that clients can still access the server
# when the server is running.
echo "Refreshing NFS Exported Filesystems..."
- /usr/sbin/exportfs -au
+ /sbin/exportfs -au
rm -f /var/lock/subsys/nfs
}
start)
cmd_run_log_box_warn "NFS server start" nfsd_start
;;
-
+
stop)
cmd_run_log_box_warn "NFS server stop" nfsd_stop
;;
-
+
reload)
- /usr/sbin/exportfs -ra
+ /sbin/exportfs -ra
touch /var/lock/subsys/nfs
;;
-
+
restart)
$0 stop
sleep 1
statusproc rpc.rquotad
fi
;;
-
+
*)
echo "Usage: $0 {reload|restart|start|status|stop}"
exit ${EXIT_CODE_FAILURE}