1
0

nfs.init 548 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/sh
  2. #PKG nfs-utils
  3. #INIT 70
  4. . /etc/rc.conf
  5. case $1 in
  6. autostop) ;;
  7. autostart)
  8. test x"${rpcbind:-NO}" = x"NO" && exit 0
  9. test x"${nfs_client:-NO}" = x"NO" && exit 0
  10. exec sh $0 start
  11. ;;
  12. start)
  13. mkdir -p /var/lib/nfs/rpc_pipefs
  14. mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
  15. /usr/sbin/idmapd
  16. /usr/sbin/gssd
  17. ;;
  18. stop)
  19. kill $(pgrep -f /usr/sbin/idmapd)
  20. kill $(pgrep -f /usr/sbin/gssd)
  21. umount /var/lib/nfs/rpc_pipefs
  22. ;;
  23. restart)
  24. sh $0 stop
  25. sh $0 start
  26. ;;
  27. *)
  28. echo "Usage: $0 {start | stop | restart}"
  29. exit 1
  30. ;;
  31. esac
  32. exit $?