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
|
2015-03-05 14:54:32 +01:00
|
|
|
/etc/rc.d/rpc.mountd start
|
|
|
|
/etc/rc.d/rpc.nfsd start
|
2010-03-02 11:27:07 +01:00
|
|
|
/usr/sbin/sm-notify
|
|
|
|
;;
|
|
|
|
stop)
|
2015-03-05 14:54:32 +01:00
|
|
|
/etc/rc.d/rpc.nfsd stop
|
|
|
|
/etc/rc.d/rpc.mountd stop
|
2010-03-02 11:27:07 +01:00
|
|
|
/usr/sbin/exportfs -au
|
2010-06-15 20:05:24 +02:00
|
|
|
/bin/umount $NFSD
|
2010-03-02 11:27:07 +01:00
|
|
|
;;
|
|
|
|
restart)
|
|
|
|
$0 stop
|
|
|
|
$0 start
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "usage: $0 [start|stop|restart]"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2010-06-15 20:05:24 +02:00
|
|
|
# End of file
|