Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37563522
en ru br
ALT Linux repositórios
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 :: Sistema/Servidores
RPM: dhcp

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

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

WITHOUT_RC_COMPAT=1

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

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

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

# Source config.
SourceIfNotEmpty /etc/sysconfig/dhcrelay

RETVAL=0

start()
{
# Check that networking is on and at least one DHCP server to relay to was specified.
is_yes "$NETWORKING" && [ -n "$SERVERS" ] || return 0
start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user dhcrelay -- dhcrelay $OPTIONS $SERVERS
RETVAL=$?
return $RETVAL
}

stop()
{
stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user dhcrelay -- 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 dhcrelay -- dhcrelay
RETVAL=$?
;;
*)
msg_usage "${0##*/} {start|stop|restart|condstop|condrestart|status}"
RETVAL=1
esac

exit $RETVAL
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009