#! /bin/sh
#
# inet          Start TCP/IP networking services. This script
#               sets the hostname, creates the routes and
#               starts the Internet Network Daemon & RPC portmapper.
#
# Author:       Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
#               Various folks at Red Hat
#

# 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/inetd ] || exit 0

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

	echo
	touch /var/lock/subsys/inet
	;;
  stop)
	# bringing down NFS filesystems isn't inet's problem I don't know 
	# why this script used to do that -- ewt

	echo -n "Stopping INET services: "
	killproc inetd

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

exit 0
