summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/dhcp/files/dhcrelay.init2')
-rwxr-xr-xnet-misc/dhcp/files/dhcrelay.init229
1 files changed, 29 insertions, 0 deletions
diff --git a/net-misc/dhcp/files/dhcrelay.init2 b/net-misc/dhcp/files/dhcrelay.init2
new file mode 100755
index 000000000000..08cfb594b831
--- /dev/null
+++ b/net-misc/dhcp/files/dhcrelay.init2
@@ -0,0 +1,29 @@
+#!/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.1 2011/03/05 23:59:20 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 ' ${IFACES}) ${DHCRELAY_OPTS} ${DHCRELAY_SERVERS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping dhcrelay"
+ start-stop-daemon --stop --pidfile /var/run/dhcp/dhcrelay.pid
+ eend $?
+}