| Bug#: 35751 | Product: Gentoo Linux | Version: 1.4 | Platform: All |
| OS/Version: Linux | Status: RESOLVED | Severity: minor | Priority: P3 |
| Resolution: FIXED | Assigned To: max@gentoo.org | Reported By: peeyotch@peeyotch.org | |
| Component: Server | |||
| URL: | |||
| Summary: chroot'ed DHCPD fails to stop on command | |||
| Keywords: | |||
| Status Whiteboard: | |||
| Opened: 2003-12-13 12:39 0000 | |||
| Description: | Opened: 2003-12-13 12:39 0000 |
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 $?
}
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.
i noticed this the other day. I'll try to get a fix in later today.
Both of these issues are fixed in -r3. Thanks for the report.