#!/bin/sh
########################################################################
# Begin portmap 
#
# Description : Start portmap daemon
#
# Author      : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version     : LFS 7.0
#
########################################################################

### BEGIN INIT INFO
# Provides:            $portmap
# Required-Start:      $network
# Should-Start:
# Required-Stop:       $network
# Should-Stop:
# Default-Start:       3 4 5
# Default-Stop:        0 1 2 6
# Short-Description:   Starts the portmap daemon.
# Description:         Starts the portmap daemon to convert RPC program numbers
#                      into DARPA protocol port numbers. It must be running in 
#                      order to make RPC# calls.
# X-LFS-Provided-By:   LFS
### END INIT INFO

. /lib/lsb/init-functions
# Begin $rc_base/init.d/portmap

#$LastChangedBy: dj $
#$Date: 2011-12-05 07:38:40 +0000 (Mon, 05 Dec 2011) $

case "$1" in
   start)
       log_info_msg "Starting RPC Portmap"
       start_daemon /sbin/portmap
       evaluate_retval
       ;;

   stop)
       log_info_msg "Stopping Portmap"
       killproc /sbin/portmap
       evaluate_retval
       ;;

   restart)
      $0 stop
      sleep 1
      $0 start
      ;;

   status)
      statusproc /sbin/portmap
      ;;

   *)
      echo "Usage: $0 {start|stop|restart|status}"
      exit 1
      ;;

esac

# End /etc/init.d/portmap

