#!/sbin/sh
#
# netbasic	This script is the very first step in setting up
#		network related stuff; it sets up the loopback
#		interface.
#
# Version:	@(#) /sbin/init.d/loopback 1.01 26-Oct-1993
#
# Author:	Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
#

  # Source function library.
  . /sbin/init.d/functions

  # See how we were called.
  case "$1" in
    start)
	# Set up loopback interface.
	# localhost defined in /etc/hosts
	# loopback  defined in /etc/networks
	echo "Setting up loopback interface"
	ifconfig lo        localhost broadcast 127.255.255.255
	route    add -host localhost gw localhost dev lo
	;;
    stop)
	# Get loopback interface down.
	echo "Shutting down loopback interface"
	ifconfig lo down
	;;
    *)
	# Oops someone made a typo.
	echo "Usage: /sbin/init.d/loopback {start|stop}"
	exit 1
  esac

exit 0
