c905793db0
Wed Aug 02 2000 Bill Nottingham <notting@redhat.com> - fix stop priority of nfslock Tue Aug 01 2000 Bill Nottingham <notting@redhat.com> - um, actually *include and apply* the statd-drop-privs patch Mon Jul 24 2000 Bill Nottingham <notting@redhat.com> - fix init script ordering (#14502) Sat Jul 22 2000 Bill Nottingham <notting@redhat.com> - run statd chrooted and as non-root - add prereqs Tue Jul 18 2000 Trond Eivind Glomsrød <teg@redhat.com> - use "License", not "Copyright" - use %{_tmppath} and %{_mandir} Mon Jul 17 2000 Matt Wilson <msw@redhat.com> - built for next release Mon Jul 17 2000 Matt Wilson <msw@redhat.com> - 0.1.9.1 - remove patch0, has been integrated upstream Wed Feb 09 2000 Bill Nottingham <notting@redhat.com> - the wonderful thing about triggers, is triggers are wonderful things... Thu Feb 03 2000 Cristian Gafton <gafton@redhat.com> - switch to nfs-utils as the base tree - fix the statfs patch for the new code base - single package that obsoletes everything we had before (if I am to keep some traces of my sanity with me...) Mon Jan 17 2000 Preston Brown <pbrown@redhat.com> - use statfs syscall instead of stat to determinal optimal blksize
103 lines
2.2 KiB
Bash
Executable File
103 lines
2.2 KiB
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# nfs This shell script takes care of starting and stopping
|
|
# the NFS services.
|
|
#
|
|
# chkconfig: - 60 20
|
|
# description: NFS is a popular protocol for file sharing across TCP/IP \
|
|
# networks. This service provides NFS server functionality, \
|
|
# which is configured via the /etc/exports file.
|
|
# probe: true
|
|
|
|
# Source function library.
|
|
. /etc/rc.d/init.d/functions
|
|
|
|
# Source networking configuration.
|
|
if [ ! -f /etc/sysconfig/network ]; then
|
|
exit 0
|
|
fi
|
|
|
|
. /etc/sysconfig/network
|
|
|
|
# Check that networking is up.
|
|
[ ${NETWORKING} = "no" ] && exit 0
|
|
|
|
[ -x /usr/sbin/rpc.nfsd ] || exit 0
|
|
[ -x /usr/sbin/rpc.mountd ] || exit 0
|
|
[ -x /usr/sbin/exportfs ] || exit 0
|
|
[ -s /etc/exports ] || exit 0
|
|
|
|
# Number of servers to be started uo by default
|
|
RPCNFSDCOUNT=8
|
|
# No NFS V3.
|
|
RPCMOUNTDOPTS="--no-nfs-version 3"
|
|
|
|
# See how we were called.
|
|
case "$1" in
|
|
start)
|
|
# Start daemons.
|
|
action "Starting NFS services: " /usr/sbin/exportfs -r
|
|
echo -n "Starting NFS quotas: "
|
|
daemon rpc.rquotad
|
|
echo
|
|
echo -n "Starting NFS mountd: "
|
|
daemon rpc.mountd $RPCMOUNTDOPTS
|
|
echo
|
|
echo -n "Starting NFS daemon: "
|
|
daemon rpc.nfsd $RPCNFSDCOUNT
|
|
echo
|
|
touch /var/lock/subsys/nfs
|
|
;;
|
|
stop)
|
|
# Stop daemons.
|
|
echo -n "Shutting down NFS mountd: "
|
|
killproc rpc.mountd
|
|
echo
|
|
echo -n "Shutting down NFS daemon: "
|
|
killproc nfsd
|
|
echo
|
|
action "Shutting down NFS services: " /usr/sbin/exportfs -au
|
|
echo -n "Shutting down NFS quotas: "
|
|
killproc rpc.rquotad
|
|
echo
|
|
rm -f /var/lock/subsys/nfs
|
|
;;
|
|
status)
|
|
status rpc.mountd
|
|
status nfsd
|
|
status rpc.rquotad
|
|
;;
|
|
restart)
|
|
echo -n "Restarting NFS services: "
|
|
echo -n "rpc.mountd "
|
|
killproc rpc.mountd
|
|
daemon rpc.mountd $RPCMOUNTDOPTS
|
|
/usr/sbin/exportfs -r
|
|
touch /var/lock/subsys/nfs
|
|
echo "done."
|
|
;;
|
|
reload)
|
|
/usr/sbin/exportfs -r
|
|
touch /var/lock/subsys/nfs
|
|
;;
|
|
probe)
|
|
if [ ! -f /var/lock/subsys/nfs ] ; then
|
|
echo start; exit 0
|
|
fi
|
|
/sbin/pidof rpc.mountd >/dev/null 2>&1; MOUNTD="$?"
|
|
/sbin/pidof nfsd >/dev/null 2>&1; NFSD="$?"
|
|
if [ $MOUNTD = 1 -o $NFSD = 1 ] ; then
|
|
echo restart; exit 0
|
|
fi
|
|
if [ /etc/exports -nt /var/lock/subsys/nfs ] ; then
|
|
echo reload; exit 0
|
|
fi
|
|
;;
|
|
*)
|
|
echo "Usage: nfs {start|stop|status|restart|reload}"
|
|
exit 1
|
|
esac
|
|
|
|
exit 0
|
|
|