#!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcrelay.init,v 1.1 2005/12/07 13:59:32 uberlord 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 local IFACES="" i for i in ${IFACE} ; do IFACES="${IFACES} -i ${i}" done ebegin "Starting dhcrelay" eval start-stop-daemon --start --exec /usr/sbin/dhcrelay \ -- "${IFACES}" -q "${DHCRELAY_OPTS}" "${DHCRELAY_SERVERS}" eend $? } stop() { ebegin "Stopping dhcrelay" start-stop-daemon --stop --pidfile /var/run/dhcrelay.pid eend $? }