From b0cc27a7ebe35956a4a7fc839be0b0beb4eddce7 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 7 Dec 2005 14:51:08 +0000 Subject: Fix init script for correct pidfile path (Portage version: 2.0.53) --- net-misc/dhcp/files/dhcp.init | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'net-misc') diff --git a/net-misc/dhcp/files/dhcp.init b/net-misc/dhcp/files/dhcp.init index 784b7ccf8690..fb3a705d7daf 100644 --- a/net-misc/dhcp/files/dhcp.init +++ b/net-misc/dhcp/files/dhcp.init @@ -1,7 +1,7 @@ #!/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/dhcp.init,v 1.1 2005/12/07 13:59:32 uberlord Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcp.init,v 1.2 2005/12/07 14:51:08 uberlord Exp $ depend() { need net @@ -32,10 +32,11 @@ start() { [[ -n ${LD_PRELOAD} ]] && export LD_PRELOAD="${LD_PRELOAD}" local pidfile=$(get_var pid-file-name) - pidfile="${pidfile:-/var/run/dhcp.pid}" + pidfile="${pidfile:-/var/run/dhcp/dhcp.pid}" ebegin "Starting ${CHROOT:+chrooted }dhcpd" eval start-stop-daemon --start --exec /usr/sbin/dhcpd \ + --pidfile "${CHROOT}${pidfile}" \ -- -q -pf "${pidfile}" \ -user dhcp -group dhcp "${DHCPD_OPTS}" \ ${CHROOT:+-chroot "${CHROOT}"} "${IFACE}" @@ -44,6 +45,7 @@ start() { stop() { ebegin "Stopping dhcpd" - start-stop-daemon --stop --pidfile "$(get_options pidfile)" + start-stop-daemon --stop --exec /usr/sbin/dhcpd \ + --pidfile "$(get_options pidfile)" eend $? } -- cgit v1.2.3-65-gdbad