opt/nfs-utils/nfsserver

39 lines
584 B
Plaintext
Raw Normal View History

2010-03-02 11:27:07 +01:00
#!/bin/sh
#
# /etc/rc.d/nfsserver: start/stop nfs server
#
2010-06-15 20:05:24 +02:00
NFSD=/proc/fs/nfsd
2010-03-02 11:27:07 +01:00
case $1 in
start)
2010-06-15 20:05:24 +02:00
/bin/mount -t nfsd nfsd $NFSD
/usr/sbin/exportfs -a
/etc/rc.d/rpc.mountd start
/etc/rc.d/rpc.nfsd start
2010-03-02 11:27:07 +01:00
/usr/sbin/sm-notify
2019-05-15 17:07:39 +02:00
/etc/rc.d/nfsdcld start
2010-03-02 11:27:07 +01:00
;;
stop)
/etc/rc.d/rpc.nfsd stop
/etc/rc.d/rpc.mountd stop
2010-03-02 11:27:07 +01:00
/usr/sbin/exportfs -au
2019-05-15 17:07:39 +02:00
/etc/rc.d/nfsdcld stop
2010-06-15 20:05:24 +02:00
/bin/umount $NFSD
2010-03-02 11:27:07 +01:00
;;
restart)
$0 stop
$0 start
;;
status)
/etc/rc.d/rpc.mountd status
/etc/rc.d/rpc.nfsd status
2019-05-15 17:07:39 +02:00
/etc/rc.d/nfsdcld status
;;
2010-03-02 11:27:07 +01:00
*)
echo "usage: $0 [start|stop|restart|status]"
2010-03-02 11:27:07 +01:00
;;
esac
2010-06-15 20:05:24 +02:00
# End of file