Bug 133019 - /etc/conf.d/dhcpd DHCPD_CHROOT minor bug
Bug#: 133019 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: trivial Priority: P2
Resolution: FIXED Assigned To: uberlord@gentoo.org Reported By: coil93@mail.ee
Component: Applications
URL: 
Summary: /etc/conf.d/dhcpd DHCPD_CHROOT minor bug
Keywords:  
Status Whiteboard: 
Opened: 2006-05-11 06:59 0000
Description:   Opened: 2006-05-11 06:59 0000
/etc/conf.d/dhcpd at line 16
"# Then run emerge dhcpd --config"
must be 
"# Then run emerge dhcp --config"

------- Comment #1 From Hod 2006-05-11 07:25:12 0000 -------
Also /etc/init.d/dhcpd script doesnt work correctly with chrooted dhcpd's
pidfile

in function stop()
start-stop-daemon --stop --exec /usr/sbin/dhcpd \
            --pidfile "$(get_options pidfile)"

in that case start-stop-daemon will search for pidfile in
/var/run/dhcp/dhcpd.pid
, but not in $chroot_dir/var/run/dhcp/dhcpd.pid
IMO --pidfile "${DHCP_CHROOT}/${pidfile}" in function stop() is more
preferable.

------- Comment #2 From Roy Marples (RETIRED) 2006-05-11 08:01:44 0000 -------
(In reply to comment #0)
> /etc/conf.d/dhcpd at line 16
> "# Then run emerge dhcpd --config"
> must be 
> "# Then run emerge dhcp --config"

Fixed.

(In reply to comment #1)
> Also /etc/init.d/dhcpd script doesnt work correctly with chrooted dhcpd's
> pidfile
> 
> in function stop()
> start-stop-daemon --stop --exec /usr/sbin/dhcpd \
>             --pidfile "$(get_options pidfile)"
> 
> in that case start-stop-daemon will search for pidfile in
> /var/run/dhcp/dhcpd.pid
> , but not in $chroot_dir/var/run/dhcp/dhcpd.pid
> IMO --pidfile "${DHCP_CHROOT}/${pidfile}" in function stop() is more
> preferable.
> 

Can't do that as the user may start it chroot, change the config to non-chroot
and then do a stop. I've fixed the stop function to prefix the pidfile with the
started chroot.

Fixed in portage cvs, thanks for the report.