[aadk-commits] qwell: udhcp/trunk r703 - /udhcp/trunk/rc.redhat.udhcpd

SVN commits to the AADK repository aadk-commits at lists.digium.com
Tue Jan 8 14:10:28 CST 2008


Author: qwell
Date: Tue Jan  8 14:10:27 2008
New Revision: 703

URL: http://svn.digium.com/view/aadk?view=rev&rev=703
Log:
Copy rc.redhat.udhcpd from old location in be repo.

Added:
    udhcp/trunk/rc.redhat.udhcpd   (with props)

Added: udhcp/trunk/rc.redhat.udhcpd
URL: http://svn.digium.com/view/aadk/udhcp/trunk/rc.redhat.udhcpd?view=auto&rev=703
==============================================================================
--- udhcp/trunk/rc.redhat.udhcpd (added)
+++ udhcp/trunk/rc.redhat.udhcpd Tue Jan  8 14:10:27 2008
@@ -1,0 +1,66 @@
+#!/bin/sh
+# udhcpd    Starts, Stops and Reloads udhcpd.
+#
+# chkconfig: 2345 91 59
+# description: udhcpd service for polycom autoprovisioning 
+# processname: udhcpd
+# pidfile: /var/run/udhcpd.pid
+#
+
+DHCPD_CONFIG="/etc/udhcpd.conf"
+DHCPD_BIN="`which udhcpd`"
+DHCPD_PROCNAME="udhcpd"
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+if [ "$DHCPD_BIN" = "" ]; then
+	echo "ERROR: udhcpd not found"
+	exit 0
+fi
+
+RETVAL=0
+
+start() {
+	# Start daemons.
+	echo -n $"Starting udhcpd: "
+	${DHCPD_BIN} > /dev/null 2>&1 &
+	RETVAL=$?
+	[ $RETVAL -eq 0 ] && success
+	echo
+	return $RETVAL
+}
+
+stop() {
+	# Stop daemons.
+	echo -n $"Shutting down udhcpd: "
+	kill `pidof ${DHCPD_PROCNAME}`
+	RETVAL=$?
+	[ $RETVAL -eq 0 ] && success
+	echo
+	return $RETVAL
+}
+
+restart() {
+	stop
+	start
+}
+
+
+# See how we were called.
+case "$1" in
+  start)
+	start
+	;;
+  stop)
+	stop
+	;;
+  restart)
+	restart
+	;;
+  *)
+	echo "Usage: udhcpd {start|stop|restart}"
+	exit 1
+esac
+
+exit $?

Propchange: udhcp/trunk/rc.redhat.udhcpd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: udhcp/trunk/rc.redhat.udhcpd
------------------------------------------------------------------------------
    svn:executable = *

Propchange: udhcp/trunk/rc.redhat.udhcpd
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: udhcp/trunk/rc.redhat.udhcpd
------------------------------------------------------------------------------
    svn:mime-type = text/plain




More information about the aadk-commits mailing list