home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
tusportal.tus.k12.pa.us
/
tusportal.tus.k12.pa.us.tar
/
tusportal.tus.k12.pa.us
/
Wyse
/
latest-image.raw
/
0.img
/
etc
/
init.d
/
dhcp6s
< prev
next >
Wrap
Text File
|
2010-05-05
|
3KB
|
106 lines
#!/bin/sh
#
### BEGIN INIT INFO
# Provides: dhcp6s
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Required-Start: $network $remote_fs
# Required-Stop: $network $remote_fs
# Short-Description: Start and stop the DHCPv6 server agent
# Description: dhcp6s provides IPv6 addresses and prefix assignment
# administrative policy and configuration information for
# DHCPv6 clients. dhcp6s also manages those addresses and
# prefixes, such as IPv6 addresses, prefixes, DNS server
# addresses, or ntp server addresses.
### END INIT INFO
#
# The fields below are left around for legacy tools (will remove later).
#
# chkconfig: - 66 36
# description: dhcp6s provides IPv6 addresses and prefix assignment \
# administrative policy and configuration information for \
# DHCPv6 clients. dhcp6s also manages those addresses and \
# prefixes, such as IPv6 addresses, prefixes, DNS server \
# addresses, or ntp server addresses.
# processname: dhcp6s
# config: /etc/dhcp6s.conf
# config: /etc/sysconfig/network/dhcp6s
. /etc/rc.status
rc_reset
RETVAL=0
prog=dhcp6s
dhcp6s=/usr/sbin/dhcp6s
lockfile=/var/lock/subsys/dhcp6s
start() {
# return 5 if program is not installed
[ -x $dhcp6s ] || return 5
# return 6 if program is not configured
[ -f /etc/dhcp6s.conf ] || return 6
[ -f /etc/sysconfig/network/dhcp6s ] || return 6
. /etc/sysconfig/network/dhcp6s
if [ -z "$DHCP6SIF" ]; then
logger -s -t "$prog" -p "daemon.info" "Warning: $prog listening on ALL interfaces"
fi
echo -n $"Starting $prog: "
startproc $dhcp6s -c /etc/dhcp6s.conf $DHCP6SARGS $DHCP6SIF
RETVAL=$?
[ $RETVAL -eq 0 ] && touch $lockfile
return $RETVAL
}
stop() {
echo -n $"Shutting down $prog: "
killproc $dhcp6s
RETVAL=$?
rm -f $lockfile
return $RETVAL
}
# See how we were called.
case "$1" in
start)
start
rc_status -v
;;
stop)
stop
rc_status -v
;;
restart|force-reload)
[ -f $lockfile ] && stop
start
rc_status -v
;;
try-restart|reload)
rc_failed 3
rc_status -v
;;
condrestart)
if [ -f $lockfile ]; then
stop && start
rc_status -v
else
rc_status -s
fi
;;
status)
checkproc $dhcp6s
rc_status -v
;;
*)
echo $"Usage: $0 {start|stop|restart|try-restart|reload|force-reload|status}"
rc_failed 3
;;
esac
rc_exit