net-misc/dhcp-4.2.3_p1 DHCPD_CHROOT="/var/lib/dhcp" # /etc/init.d/dhcpd start * /var/lib/dhcp/etc/dhcp/dhcpd.conf does not exist * ERROR: dhcpd failed to start All chrooted dirs are created but no config files copied into.
so create the file in question first: /var/lib/dhcp/etc/dhcp/dhcpd.conf there is no default dhcpd.conf file created by the ebuild (ignoring the completely commented out file), so copying the file out of / and into the chroot first is debatable as it can be confusing behavior. should the init.d also automatically sync over changes ?
In previous versions "emerge --config dhcp" did all this work. If we save changes to dhcpd.conf at chroot directly there is no need to have /etc/dhcp/dhcpd.conf at all. Without sync from / into chroot in init.d real config is placed into chroot. Very strange. BTW named syncs on every init and have no problem. Thanx for explanation.
(In reply to comment #2) i don't think that's entirely correct. earlier versions of dhcp did not have a config file inside the chroot. it'd always use the one in /etc/. this allowed you to run dhcpd in a chroot (for security purposes), but did not let you easily run multiple dhcpd servers simultaneously in different chroots with different configs. this changed with Bug 388395. in light of the new multiplexing support, i don't think it'd be good to automatically copy the config out of / and into the chroot. i'm open to suggestions though for making this smoother.
With current scheme chrooting without multiconfig don't work at all. As I see in Bug 388395, /chroot/dhcpd.foo/etc/dhcp/dhcpd.conf need to created by hand. Maybe copy /etc/dhcp/dhcp.foo.conf to /chroot/dhcpd.foo/etc/dhcp/dhcpd.conf on every start? Current situation is worse than it was. No way to use DHCP_CHROOT out of the box.
sorry, but that's bs. regardless of this change, you can't use dhcp "out of the box" let alone a chroot-ed version. like i said in comment #1, the config files we install require manual editing before they work at all.
Is there any plans to change the situation or it will be mainstream? I wonder if I need to change howtos.
(In reply to comment #6) as i mentioned, suggestions for improvement are welcome. i don't think we should go copying the file out of /etc/ every time though because that'd cause misbehavior with people running in multiple chroots -- you'd have diff servers responding to the same requests.
Please tell me where can I read about dhcp multiconfig? Where are config files for multiconfig stored now? In chroot? I have some thoughts about but want to give my vision at all.
And maybe would be better to use emails to discuss, not bugtracker?
symlink /etc/init.d/another-dhcpd to /etc/init.d/dhcpd, then create /etc/conf.d/another-dhcpd and you can now run two dhcpd servers as long as you've configured them for diff chroots and with non-conflicting settings (e.g. serving different ranges on different interfaces).