You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-misc/dhcp/files/dhcrelay.init3

34 lines
701 B

#!/sbin/openrc-run
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend() {
need net
use logger #@slapd@
}
start() {
if [ -z "${DHCRELAY_SERVERS}" ] ; then
eerror "No DHCRELAY_SERVERS specified in /etc/conf.d/${SVCNAME}"
return 1
fi
checkpath -d /var/run/dhcp
local iface_opts
if [ -n "${IFACE}" ] ; then
iface_opts=$(printf -- '-i %s ' ${IFACE})
fi
ebegin "Starting ${SVCNAME}"
start-stop-daemon --start --exec /usr/sbin/dhcrelay \
-- -q ${iface_opts} ${DHCRELAY_OPTS} ${DHCRELAY_SERVERS}
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --pidfile /var/run/dhcp/${SVCNAME}.pid
eend $?
}