dhcpd init.d script doesn't test config using dhcpd -t command. When using scripted dhcpd.conf and dhcpd stop start, dhcpd can stop running on error. Some distros are using configtest before stop and start, I think gentoo should do this too to avoid dhcp server start failure, which can make a lot of problems. Reproducible: Always Expected Results: which patched init.d script; /etc/init.d/dhcpd restart # /etc/init.d/dhcpd restart * dhcpd has detected a syntax error in your configuration files: Internet Systems Consortium DHCP Server V3.1.1-Gentoo Copyright 2004-2008 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/sw/dhcp/ WARNING: Host declarations are global. They are not limited to the scope you declared them in. //etc/dhcp/dhcpd.conf line 119: Bogus number: -. filename = binary-to-ascii (16, 8, -, ^ Configuration file errors encountered -- exiting ...
Created attachment 182333 [details, diff] patch for dhcpd.init file in portage
Thanks for the patch, looks like a good idea. Assigning to maintainers.
+*dhcp-4.1.0 (09 Jul 2009) +*dhcp-3.1.2 (09 Jul 2009) + + 09 Jul 2009; <chainsaw@gentoo.org> +dhcp-3.1.2.ebuild, +dhcp-4.1.0.ebuild, + +files/dhcp-4.1-dhclient-metric.patch, +files/dhcp-4.1-no_isc_blurb.patch, + +files/dhcpd.init2: + Version bump to 3.1.2 & 4.1.0 upstream releases, as requested in bug + #264809. Create /var/lib/dhclient as per bug #222261. Recursive chown to + dhcp:dhcp closes bug #236671. Test config in init-script, apache-style by + Arturas from Lithuania in bug #259364. Paranoia/chroot support now + upstream in 4.1, dropped patch. A very welcome improvement that is now in the portage tree. Thank you for your contribution Arturas :)