nfsclient.initd 753 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/usr/bin/openrc-run
  2. # Copyright 1999-2015 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License v2
  4. [ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
  5. depend() {
  6. local opts myneed=""
  7. if [ -e /etc/fstab ] ; then
  8. for opts in $(fstabinfo -o -t nfs,nfs4) ; do
  9. case $opts in
  10. *sec=krb*|*sec=spkm*) myneed="$myneed rpc.gssd" ;;
  11. esac
  12. done
  13. fi
  14. config /etc/fstab
  15. need portmap rpc.statd rpc.idmapd ${myneed}
  16. use ypbind dns
  17. }
  18. start() {
  19. if [ -x /usr/bin/sm-notify ] ; then
  20. ebegin "Starting NFS sm-notify"
  21. /usr/bin/sm-notify ${OPTS_SMNOTIFY}
  22. eend $?
  23. fi
  24. # Make sure nfs support is loaded in the kernel #64709
  25. if [ -e /proc/modules ] && ! grep -qs 'nfs$' /proc/filesystems ; then
  26. modprobe -q nfs
  27. fi
  28. return 0
  29. }