#! /bin/sh
#
# slip		Start TCP/IP networking services. This script
#		sets the hostname, creates the routes and
#		starts the Internet Network Daemon & RPC portmapper.
#
# Version:	@(#) /etc/init.d/slip 1.01 26-Oct-1993
#
# Author:	Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
#		Riku Meskanen, <mesrik@jyu.fi>
#

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

  # See how we were called.
  case "$1" in
    start)
	echo "Initializing SLIP service:"
	hostname=`/bin/hostname`

	if [ "`cat /etc/NETWORKING 2>/dev/null`" = YES ]
	then
		dip /conf/net/dip/slip1.jyu.fi
	fi
        echo
	;;
    stop)
	# Stop SLIP service.
	echo "Shutting down SLIP service:"
	if [ -z "`pidof dip`" ]
        then
             echo "SLIP already down" 
	else
	     dip -k
        fi
	echo 
	;;
    *)
	# Oops someone made a typo.
	echo "Usage: /etc/init.d/slip {start|stop}"
	exit 1
  esac

  exit 0
