nfs_client.init 628 B

12345678910111213141516171819202122232425262728293031323334
  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. test x"$nfs_client" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start
  11. exec sh $0 start
  12. ;;
  13. start)
  14. mkdir -p /var/lib/nfs/rpc_pipefs
  15. mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
  16. /usr/sbin/idmapd
  17. /usr/sbin/gssd
  18. ;;
  19. stop)
  20. kill $(pgrep -f /usr/sbin/idmapd)
  21. kill $(pgrep -f /usr/sbin/gssd)
  22. umount /var/lib/nfs/rpc_pipefs
  23. ;;
  24. restart)
  25. sh $0 stop
  26. sh $0 start
  27. ;;
  28. *)
  29. echo "Usage: $0 {start | stop | restart}"
  30. exit 1
  31. ;;
  32. esac
  33. exit $?