Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37560125
en ru br
ALT Linux repos
S:4.4.3.P1-alt1
5.0: 3.0.7-alt1
4.1: 3.0.6-alt2.M41.1
4.0: 3.0.6-alt1
3.0: 3.0.2-alt1

Group :: System/Servers
RPM: dhcp

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

#!/bin/sh
#
# dhcrelay6 This shell script takes care of starting and stopping
# dhcrelay (DHCPv6).
#
# chkconfig: - 65 35
# description: \
# The Internet Software Consortium DHCPv6 Relay Agent, dhcrelay, provides a \
# means for relaying DHCPv6 and BOOTP requests from a subnet to which no \
# DHCPv6 server is directly connected to one or more DHCPv6 servers on other \
# subnets.
#
# processname: dhcrelay
# pidfile: /var/run/dhcrelay6.pid

WITHOUT_RC_COMPAT=1

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

# Source networking configuration.
SourceIfNotEmpty /etc/sysconfig/network

PIDFILE=/var/run/dhcrelay6.pid
LOCKFILE=/var/lock/subsys/dhcrelay6

# Source config.
SourceIfNotEmpty /etc/sysconfig/dhcrelay6

RETVAL=0
DISPLAYNAME="dhcrelay (DHCPv6)"

start()
{
# Check that networking is on.
is_yes "$NETWORKING" || return 0

if [ -z "$LOWER_INTERFACES" -o -z "$UPPER_INTERFACES" ]; then
msg_starting "$DISPLAYNAME"
printf "%s" "At least one lower and one upper network interface must be specified"
echo_failure
echo
return 1
fi

export UPPER_INTERFACES LOWER_INTERFACES OPTIONS
start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user dhcrelay6 \
--displayname "$DISPLAYNAME" -- dhcrelay6
RETVAL=$?
return $RETVAL
}

stop()
{
stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user dhcrelay6 \
--displayname "$DISPLAYNAME" -- dhcrelay
RETVAL=$?
return $RETVAL
}

restart()
{
stop
start
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
reload|restart)
restart
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condreload|condrestart)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
status)
status --pidfile "$PIDFILE" --expect-user dhcrelay6 --displayname "dhcrelay (DHCPv6)" -- dhcrelay
RETVAL=$?
;;
*)
msg_usage "${0##*/} {start|stop|restart|condstop|condrestart|status}"
RETVAL=1
esac

exit $RETVAL
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin