diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/dhcp/files/dhcrelay.init3 |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/dhcp/files/dhcrelay.init3')
-rw-r--r-- | net-misc/dhcp/files/dhcrelay.init3 | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/net-misc/dhcp/files/dhcrelay.init3 b/net-misc/dhcp/files/dhcrelay.init3 new file mode 100644 index 000000000000..a08ba8850740 --- /dev/null +++ b/net-misc/dhcp/files/dhcrelay.init3 @@ -0,0 +1,33 @@ +#!/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 $? +} |