opt/nfs-utils/nfsserver

40 lines
660 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
PIPEFS=/var/lib/nfs/rpc_pipefs
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
/bin/mount -t rpc_pipefs rpc_pipefs $PIPEFS
/usr/sbin/rpc.idmapd
/usr/sbin/exportfs -a
2010-03-02 11:27:07 +01:00
/usr/sbin/rpc.mountd
/usr/sbin/rpc.statd --no-notify
2010-06-15 20:05:24 +02:00
/usr/sbin/rpc.nfsd --syslog 8
2010-03-02 11:27:07 +01:00
/usr/sbin/sm-notify
;;
stop)
killall -q -2 nfsd
killall -q /usr/sbin/rpc.statd
killall -q /usr/sbin/rpc.mountd
/usr/sbin/exportfs -au
2010-06-15 20:05:24 +02:00
killall -q /usr/sbin/rpc.idmapd
/bin/umount $PIPEFS
/bin/umount $NFSD
2010-03-02 11:27:07 +01:00
;;
restart)
$0 stop
sleep 2
$0 start
;;
*)
echo "usage: $0 [start|stop|restart]"
;;
esac
2010-06-15 20:05:24 +02:00
# End of file