rpcbind 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #!/bin/sh
  2. ########################################################################
  3. # Begin rpcbind
  4. #
  5. # Description : Start rpcbind daemon
  6. #
  7. # Author : Ken Moffat - ken@linuxfromscratch.org, based on portmap
  8. # script by Bruce Dubbs
  9. #
  10. # Version : LFS 7.0
  11. #
  12. ########################################################################
  13. ### BEGIN INIT INFO
  14. # Provides: rpcbind $portmap
  15. # Required-Start: $network
  16. # Should-Start:
  17. # Required-Stop: $network
  18. # Should-Stop:
  19. # Default-Start: 3 4 5
  20. # Default-Stop: 0 1 2 6
  21. # Short-Description: Starts the rpcbind daemon.
  22. # Description: Starts the rpcbind daemon to convert RPC program numbers
  23. # into DARPA protocol port numbers. It must be running in
  24. # order to make RPC# calls. Replaces portmap, which does
  25. # not work with libtirpc.
  26. # X-LFS-Provided-By: BLFS / LFS 7.0
  27. ### END INIT INFO
  28. . /etc/rc.d/functions
  29. #$LastChangedBy: dj $
  30. #$Date: 2011-12-05 01:38:40 -0600 (Mon, 05 Dec 2011) $
  31. case "$1" in
  32. start)
  33. log_info_msg "Starting rpcbind"
  34. start_daemon /sbin/rpcbind
  35. evaluate_retval
  36. ;;
  37. stop)
  38. log_info_msg "Stopping rpcbind"
  39. killproc /sbin/rpcbind
  40. evaluate_retval
  41. ;;
  42. restart)
  43. $0 stop
  44. sleep 1
  45. $0 start
  46. ;;
  47. status)
  48. statusproc /sbin/rpcbind
  49. ;;
  50. *)
  51. echo "Usage: $0 {start|stop|restart|status}"
  52. exit 1
  53. ;;
  54. esac
  55. # End /etc/init.d/rpcbind