head	1.1;
branch	1.1.1;
access;
symbols
	import-20090318:1.1.1.1
	import-20081205:1.1.1.1
	rel-8-1-2-sv:1.1.1.1
	import-20080404:1.1.1.1
	import-20071105:1.1.1.1
	import-20061124:1.1.1.1
	freescale:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2006.11.27.11.19.26;	author seh;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2006.11.27.11.19.26;	author seh;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Initial revision
@
text
@#! /bin/sh

# This file started as /etc/rc.d/init.d/S31dhcpd - Start/Stop the DHCP server
# daemon(s).
#

# Comment out the following exit line to enable this script.
# Before doing so, you need to edit the /etc/dhcpd.conf file.
#exit 0

KILLWAIT=3
DAEMON="dhcpd"

which ip
if [ "$?" != "0" ]; then
	echo "$0: Missing ip"
	exit 1
fi

case "$1" in

    start)
	# Ensure $DHCP_ARG device is there
	if ! ip link | grep -q $DHCP_ARG; then
		echo "$0: Network interface $DHCP not present" >&2
		exit 2
	fi

	echo "Starting ${DAEMON}"
	${DAEMON} $DHCP_ARG
	if [ "$?" = "0" ]; then echo "Done"
	else                    echo "FAILED"; fi
	sleep 1
	;;

    stop)
	echo "Stopping ${DAEMON}"
	killall ${DAEMON}
	if [ "$?" = "0" ]; then echo "Done"
	else                    echo "FAILED"; fi
	;;

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

    *)
	echo "Usage: $0 (start|stop|restart)"
	exit 1
	;;

esac

exit 0

@


1.1.1.1
log
@Import from fsl 20061124
@
text
@@
