Author: darekr Date: Tue Sep 20 11:30:41 2005 GMT Module: SOURCES Tag: HEAD ---- Log message: - new
---- Files affected: SOURCES: dhcp6c.init (NONE -> 1.1) (NEW) ---- Diffs: ================================================================ Index: SOURCES/dhcp6c.init diff -u /dev/null SOURCES/dhcp6c.init:1.1 --- /dev/null Tue Sep 20 13:30:41 2005 +++ SOURCES/dhcp6c.init Tue Sep 20 13:30:36 2005 @@ -0,0 +1,69 @@ +#!/bin/sh +# +# dhcp6c dhcp6c is an implementation of DHCPv6 server. +# This shell script takes care of starting and stopping +# dhcp6c. +# +# chkconfig: - 66 36 +# description: dhcp6c supports server side of Dynamic Host Configuration +# Protocol for IPv6. +# processname: dhcp6c +# config: /etc/dhcp6c.conf +# config: /etc/sysconfig/dhcp6c +# Source function library +. /etc/rc.d/init.d/functions + +# Get network config +. /etc/sysconfig/network + +# Get service config +[ -f /etc/sysconfig/dhcp6c ] && . /etc/sysconfig/dhcp6c + +# Check that networking is up. +if is_yes "${NETWORKING}"; then + if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then + msg_network_down DHCP6C + exit 1 + fi + else + exit 0 +fi + +RETVAL=0 + +case "$1" in + start) + # Check if the service is already running? + if [ ! -f /var/lock/subsys/dhcp6c ]; then + msg_starting "DHCP6C" + daemon dhcp6c $DHCP6CIF + RETVAL=$? + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcp6c + else + msg_already_running DHCP6C + fi + ;; + stop) + if [ -f /var/lock/subsys/dhcp6c ]; then + msg_stopping "DHCP6C Server" + killproc dhcp6c + rm -f /var/run/dhcp6c.pid /var/lock/subsys/dhcp6c >/dev/null 2>&1 + else + msg_not_running DHCP6C + fi + ;; + restart|reload) + $0 stop + $0 start + exit $? + ;; + status) + status dhcp6c + exit $? + ;; + *) + msg_usage "$0 {start|stop|restart|force-reload|status}" + exit 3 +esac + +exit $RETVAL ================================================================ _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit