#! /bin/sh
#
# portmap       Start/Stop RPC portmapper
#
# Author:       Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
#               Modified for RHS Linux by Donnie Barnes
#

# Source function library.
. /etc/rc.d/init.d/functions

# Get config.
. /etc/sysconfig/network

# Check that networking is up.
if [ ${NETWORKING} = "no" ]
then
	exit 0
fi

[ -f /usr/sbin/portmap ] || exit 0

# See how we were called.
case "$1" in
  start)
	echo -n "Starting portmapper: "
	daemon portmap

	echo
	touch /var/lock/subsys/portmap
	;;
  stop)
	echo -n "Stopping INET services: "
	killproc portmap

	echo
	rm -f /var/lock/subsys/portmap
	;;
  *)
	echo "Usage: portmap {start|stop}"
	exit 1
esac

exit 0
