Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37568311
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

# This shell script takes care of starting and stopping dhcpd.
#
# chkconfig: - 65 35
# description: \
# The Internet Software Consortium DHCP Server, dhcpd, implements \
# the Dynamic Host Configuration Protocol (DHCP) and the Internet \
# Bootstrap Protocol (BOOTP). DHCP allows hosts on a TCP/IP network \
# to request and be assigned IP addresses, and also to discover \
# information about the network to which they are attached. BOOTP \
# provides similar functionality, with certain restrictions.
# processname: dhcpd
# config: /etc/dhcp/dhcpd.conf
# pidfile: /var/run/dhcpd.pid

WITHOUT_RC_COMPAT=1

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

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

PIDFILE=/var/run/dhcpd.pid
DHCPD_CONF=/etc/dhcp/dhcpd.conf
DHCPD_CONF_SAMPLE=/etc/dhcp/dhcpd.conf.sample
LOCKFILE=/var/lock/subsys/dhcpd

# Source config.
SourceIfNotEmpty /etc/sysconfig/dhcpd

RETVAL=0

start()
{
is_yes "$NETWORKING" || return 0
if [ -e "$DHCPD_CONF" ]; then
action "Adjusting environment for dhcpd:" /etc/chroot.d/dhcpd.all ||:
start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user dhcpd -- dhcpd $DHCPDARGS
RETVAL=$?
else
msg_starting dhcpd
printf "%s: %s" "$DHCPD_CONF" "No such file or directory"
failure "dhcpd startup"
echo
if [ -e "$DHCPD_CONF_SAMPLE" ]; then
echo "There is a sample configuration file under $DHCPD_CONF_SAMPLE" >&2
fi
RETVAL=1
fi
return $RETVAL
}

stop()
{
stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user dhcpd -- dhcpd
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 dhcpd -- dhcpd
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