quarks/net-misc/dhcp/files/dhcrelay.init2

30 lines
712 B
Plaintext
Raw Normal View History

#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcrelay.init2,v 1.2 2011/03/08 20:13:26 vapier Exp $
depend() {
need net
use logger
}
start() {
if [ -z "${DHCRELAY_SERVERS}" ]; then
eerror "No DHCRELAY_SERVERS specified in /etc/conf.d/dhcrelay"
return 1
fi
checkpath -d /var/run/dhcp
ebegin "Starting dhcrelay"
start-stop-daemon --start --exec /usr/sbin/dhcrelay \
-- -q $(printf -- '-i %s ' ${IFACE}) ${DHCRELAY_OPTS} ${DHCRELAY_SERVERS}
eend $?
}
stop() {
ebegin "Stopping dhcrelay"
start-stop-daemon --stop --pidfile /var/run/dhcp/dhcrelay.pid
eend $?
}