Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 35751 - chroot'ed DHCPD fails to stop on command
Summary: chroot'ed DHCPD fails to stop on command
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Max Kalika (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-13 12:39 UTC by Peeyotch
Modified: 2004-01-14 17:15 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peeyotch 2003-12-13 12:39:14 UTC
When DHCPD is run chroot'ed, "/etc/init.d/dhcp stop" 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 "Stopping dhcpd"
-       start-stop-daemon --stop --quiet --pidfile /var/run/dhcp/dhcpd.pid
+       start-stop-daemon --stop --quiet --pidfile ${CHROOT}/var/run/dhcp/dhcpd.
pid
        eend $?
 }
Comment 1 Peeyotch 2003-12-13 12:48:19 UTC
confirmed after re-emerge
Comment 2 Chris Snyder 2003-12-22 12:45:13 UTC
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.
Comment 3 Max Kalika (RETIRED) gentoo-dev 2003-12-22 13:55:50 UTC
i noticed this the other day.  I'll try to get a fix in later today.
Comment 4 Max Kalika (RETIRED) gentoo-dev 2004-01-14 17:15:20 UTC
Both of these issues are fixed in -r3.  Thanks for the report.