Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 388395

Summary: net-misc/dhcp-4.2.2-r2: chroot should use --enable-early-chroot for per-service config files
Product: Gentoo Linux Reporter: Touch <touchmail2011>
Component: New packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: touchmail2011
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Touch 2011-10-25 00:26:35 UTC
When starting dhcpd in chroot it uses config file /etc/dhcp/dhcpd.conf
and ignores config file /chroot/dhcpd.foo/etc/dhcp/dhcpd.conf

Reproducible: Always

Steps to Reproduce:
1.emerge =net-misc/dhcp-4.2.2-r2
2./etc/init.d/dhcpd.foo start
3.
Actual Results:  
 * Starting chrooted dhcpd.foo ...
 * start-stop-daemon: failed to start `/usr/sbin/dhcpd'                                                                                                            [ !! ]
 * ERROR: dhcpd.foo failed to start


Solution: 
add to dhcp-4.2.2-r2.ebuild in section:
src_configure()
after:
        econf \
string:
                --enable-early-chroot \
then:
ebuild dhcp-4.2.2-r2.ebuild digest
and remerge dhcp
Comment 1 SpanKY gentoo-dev 2011-10-25 05:37:30 UTC
why is this a problem ?
Comment 2 Touch 2011-10-25 05:47:34 UTC
When using multiple dhcpd in different chrooted directories, the config file /etc/dhcp/dhcpd.conf is one for all. Dhcpd is not using different config files in chrooted directories such as  /chroot/dhcpd.foo/etc/dhcp/dhcpd.conf and /chroot/dhcpd.foo1/etc/dhcp/dhcpd.conf.
Comment 3 SpanKY gentoo-dev 2011-12-04 22:45:20 UTC
should be all set now in the tree; thanks for the report!

Commit message: Enable --enable-early-chroot so config files can be per-chroot
http://sources.gentoo.org/net-misc/dhcp/dhcp-4.2.2-r3.ebuild?rev=1.1
http://sources.gentoo.org/net-misc/dhcp/files/dhcpd.init5?rev=1.1