Hello, net-misc/dhcp init script is not suitable for usage with chroot and 4.2.x branch of dhcp. It has the following issues: 1) /proc needs to be mounted inside of chroot, otherwise dhcpd will fail to start with the following error: Apr 7 22:48:12 localhost dhcpd: Error opening '/proc/net/dev' to list interfaces Apr 7 22:48:12 localhost dhcpd: Can't get list of interfaces. 2) dhcpd.conf is read by the daemon from /etc/dhcp/ *before* it is actually chrooted, so configure script must check for /etc/dhcp/dhcpd.conf existence instead of chrooted variant. That is, dhcpd.conf from chrooted directory is useless and is not read by the daemon at all (you can check this by modifying some parameter in the config file, restarting the daemon and checking from some client). 3) It spite of the following two issues ebuild's config function must be changed to create /proc inside of chroot and to *not* copy /etc/dhcp/dhcpd.conf there.
Created attachment 268933 [details, diff] dhcpd.init.diff This patch fixes first two issues, but it will broke older dhcp releases (3.x branch), so it must be extended for further checks. It uses bind mount for /proc inside of chroot if chroot is used and checks for dhcpd.conf in normal /etc, instead of chrooted version, because the first one is used instead of the latter.
Created attachment 268937 [details] dhcpd.init4 New dhcpd init script.
Created attachment 268939 [details, diff] dhcp-4.2.1-r1.ebuild.patch Ebuild update with for new init script and fixes proposed earlier.
any news?
Created attachment 284957 [details] dhcpd.init4 your init script doesn't catch all cases. try this instead.
*** Bug 382039 has been marked as a duplicate of this bug. ***
I confirm SpanKY's init seems to work.
should be all set now in the tree; thanks for the report! Commit message: Rewrite chroot usage to work with newer versions http://sources.gentoo.org/net-misc/dhcp/dhcp-4.2.2-r2.ebuild?rev=1.1 http://sources.gentoo.org/net-misc/dhcp/files/dhcpd.conf2?rev=1.1 http://sources.gentoo.org/net-misc/dhcp/files/dhcpd.init4?rev=1.1
Why has pkg_config() disappeared from ebuild? `emerge dhcp --config' as advised in /etc/conf.d/dhcpd does not work anymore.
should be all set now in the tree; thanks for the report! Commit message: Drop old `emerge --config` comment http://sources.gentoo.org/net-misc/dhcp/dhcp-4.2.2-r2.ebuild?r1=1.1&r2=1.2 http://sources.gentoo.org/net-misc/dhcp/files/dhcpd.conf2?r1=1.1&r2=1.2