<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>35751</bug_id>
          
          <creation_ts>2003-12-13 12:39 0000</creation_ts>
          <short_desc>chroot&apos;ed DHCPD fails to stop on command</short_desc>
          <delta_ts>2004-01-14 17:15:20 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Server</component>
          <version>1.4</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P3</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>peeyotch@peeyotch.org</reporter>
          <assigned_to>max@gentoo.org</assigned_to>
          <cc>maxwang_tw@yahoo.com</cc>

      

      
          <long_desc isprivate="0">
            <who>peeyotch@peeyotch.org</who>
            <bug_when>2003-12-13 12:39:14 0000</bug_when>
            <thetext>When DHCPD is run chroot&apos;ed, &quot;/etc/init.d/dhcp stop&quot; reports [!!] and the process continues to run.

STEPS TO DUPLICATE
1) emerge dhcp
2) edit /etc/conf.d/dhcp to use chroot, /etc/init.d/dhcp start
3) attempt /etc/init.d/dhcp stop

WHY IT HAPPENS

The stop() section of the init file fails to account for the possibility of a chrooted setup.  

HOW TO FIX IT

--- /etc/init.d/dhcp    2003-12-13 14:05:19.000000000 -0600
+++ /etc/init.d/dhcp.new        2003-12-13 14:05:55.000000000 -0600
@@ -38,6 +38,6 @@

 stop() {
        ebegin &quot;Stopping dhcpd&quot;
-       start-stop-daemon --stop --quiet --pidfile /var/run/dhcp/dhcpd.pid
+       start-stop-daemon --stop --quiet --pidfile ${CHROOT}/var/run/dhcp/dhcpd.
pid
        eend $?
 }</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>peeyotch@peeyotch.org</who>
            <bug_when>2003-12-13 12:48:19 0000</bug_when>
            <thetext>confirmed after re-emerge</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>csnyder@mvpsoft.com</who>
            <bug_when>2003-12-22 12:45:13 0000</bug_when>
            <thetext>Another comment:

The ebuild does not automatically create and chown to dhcp:dhcp the /chroot/dhcp/var/run/dhcp directory needed for dhcpd to store its PID.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>max@gentoo.org</who>
            <bug_when>2003-12-22 13:55:50 0000</bug_when>
            <thetext>i noticed this the other day.  I&apos;ll try to get a fix in later today.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>max@gentoo.org</who>
            <bug_when>2004-01-14 17:15:20 0000</bug_when>
            <thetext>Both of these issues are fixed in -r3.  Thanks for the report.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>