diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-05-16 05:08:40 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-05-16 05:08:40 +0000 |
commit | f7b0beac000c1aba7a1ad740d7d3f23a02fa5b1a (patch) | |
tree | 215e4a4971d902b50ff359ae4730b4f55e07f880 /net-misc/dhcp/files/dhcrelay.init3 | |
parent | Pull in virtual/os-headers for soundcard.h include. (diff) | |
download | gentoo-2-f7b0beac000c1aba7a1ad740d7d3f23a02fa5b1a.tar.gz gentoo-2-f7b0beac000c1aba7a1ad740d7d3f23a02fa5b1a.tar.bz2 gentoo-2-f7b0beac000c1aba7a1ad740d7d3f23a02fa5b1a.zip |
Version bump, and add dhcrelay6 init.d support #415957 by Spooky Ghost.
(Portage version: 2.2.0_alpha102/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/dhcp/files/dhcrelay.init3')
-rwxr-xr-x | net-misc/dhcp/files/dhcrelay.init3 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/net-misc/dhcp/files/dhcrelay.init3 b/net-misc/dhcp/files/dhcrelay.init3 new file mode 100755 index 000000000000..277a844708f2 --- /dev/null +++ b/net-misc/dhcp/files/dhcrelay.init3 @@ -0,0 +1,29 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcrelay.init3,v 1.1 2012/05/16 05:08:40 vapier Exp $ + +depend() { + need net + use logger +} + +start() { + if [ -z "${DHCRELAY_SERVERS}" ]; then + eerror "No DHCRELAY_SERVERS specified in /etc/conf.d/${SVCNAME}" + return 1 + fi + + checkpath -d /var/run/dhcp + + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --exec /usr/sbin/dhcrelay \ + -- -q $(printf -- '-i %s ' ${IFACE}) ${DHCRELAY_OPTS} ${DHCRELAY_SERVERS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --pidfile /var/run/dhcp/${SVCNAME}.pid + eend $? +} |