/[gentoo-x86]/net-misc/dhcp/files/dhcrelay.init3
Gentoo

Diff of /net-misc/dhcp/files/dhcrelay.init3

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.2
1#!/sbin/runscript 1#!/sbin/runscript
2# Copyright 1999-2012 Gentoo Foundation 2# Copyright 1999-2012 Gentoo Foundation
3# Distributed under the terms of the GNU General Public License v2 3# Distributed under the terms of the GNU General Public License v2
4# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcrelay.init3,v 1.1 2012/05/16 05:08:40 vapier Exp $ 4# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcrelay.init3,v 1.2 2012/05/16 15:57:20 vapier Exp $
5 5
6depend() { 6depend() {
7 need net 7 need net
8 use logger 8 use logger
9} 9}
10 10
11start() { 11start() {
12 if [ -z "${DHCRELAY_SERVERS}" ]; then 12 if [ -z "${DHCRELAY_SERVERS}" ] ; then
13 eerror "No DHCRELAY_SERVERS specified in /etc/conf.d/${SVCNAME}" 13 eerror "No DHCRELAY_SERVERS specified in /etc/conf.d/${SVCNAME}"
14 return 1 14 return 1
15 fi 15 fi
16 16
17 checkpath -d /var/run/dhcp 17 checkpath -d /var/run/dhcp
18 18
19 local iface_opts
20 if [ -n "${IFACE}" ] ; then
21 iface_opts=$(printf -- '-i %s ' ${IFACE})
22 fi
23
19 ebegin "Starting ${SVCNAME}" 24 ebegin "Starting ${SVCNAME}"
20 start-stop-daemon --start --exec /usr/sbin/dhcrelay \ 25 start-stop-daemon --start --exec /usr/sbin/dhcrelay \
21 -- -q $(printf -- '-i %s ' ${IFACE}) ${DHCRELAY_OPTS} ${DHCRELAY_SERVERS} 26 -- -q ${iface_opts} ${DHCRELAY_OPTS} ${DHCRELAY_SERVERS}
22 eend $? 27 eend $?
23} 28}
24 29
25stop() { 30stop() {
26 ebegin "Stopping ${SVCNAME}" 31 ebegin "Stopping ${SVCNAME}"

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20