opt/nfs-utils/nfsserver

39 lines
584 B
Bash

#!/bin/sh
#
# /etc/rc.d/nfsserver: start/stop nfs server
#
NFSD=/proc/fs/nfsd
case $1 in
start)
/bin/mount -t nfsd nfsd $NFSD
/usr/sbin/exportfs -a
/etc/rc.d/rpc.mountd start
/etc/rc.d/rpc.nfsd start
/usr/sbin/sm-notify
/etc/rc.d/nfsdcld start
;;
stop)
/etc/rc.d/rpc.nfsd stop
/etc/rc.d/rpc.mountd stop
/usr/sbin/exportfs -au
/etc/rc.d/nfsdcld stop
/bin/umount $NFSD
;;
restart)
$0 stop
$0 start
;;
status)
/etc/rc.d/rpc.mountd status
/etc/rc.d/rpc.nfsd status
/etc/rc.d/nfsdcld status
;;
*)
echo "usage: $0 [start|stop|restart|status]"
;;
esac
# End of file