rpc.statd.initd 704 B

123456789101112131415161718192021222324252627282930313233
  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. rpc_bin=/usr/bin/rpc.statd
  6. rpc_pid=/run/rpc.statd.pid
  7. depend() {
  8. use ypbind net
  9. need portmap
  10. after quota
  11. }
  12. start() {
  13. # Don't start rpc.statd if already started by someone else ...
  14. # Don't try and kill it if it's already dead ...
  15. if killall -q -0 ${rpc_bin} ; then
  16. return 0
  17. fi
  18. ebegin "Starting NFS statd"
  19. start-stop-daemon --start --exec ${rpc_bin} -- --no-notify ${OPTS_RPC_STATD}
  20. eend $?
  21. }
  22. stop() {
  23. ebegin "Stopping NFS statd"
  24. start-stop-daemon --stop --exec ${rpc_bin} --pidfile /run/rpc.statd.pid
  25. eend $?
  26. }