Red Hat Bugzilla – Bug 479012
dhcpd.conf move to /etc/dhcp incomplete
Last modified: 2009-01-13 09:51:59 EST
dhcpd won't start after upgrading to dhcp package in rawhide.
Changelog says dhcpd.conf moved from /etc to /etc/dhcp, but my dhcpd.conf was not renamed as part of the upgrade; it should have been.
Even after renaming it, dhcpd still won't start, because /etc/init.d/dhcpd is looking in the old location.
Is this fixed with dhcp-4.1.0-1.fc11 in rawhide?
Sorry about the incomplete change to the new config file location. I was wanting to locate all config files for dhcp in one subdirectory in /etc since the number of files you could have just for dhcp could be a large number. That and I've got dhclient-script plugins coming.
No, this is not fixed.
The spec file still has dhcpd.conf in /etc rather than /etc/dhcp. You need to move it into /etc/dhcp, and you need to make sure that it is marked %config(noreplace).
The postinstall script moves /etc/dhcpd.conf to /etc/dhcp/dhcpd.conf if the former exists, but it also needs to check if the latter does *not* exist, and only do the move if it doesn't.
It makes no sense to me that the postinstall script uses cp -a and then rm -f to move dhcpd.conf, rather than just using mv -f.
You need to change the path to dhcpd.conf in the config: line in the comment at the top of the init script.
if [ -f /etc/dhcpd.conf ] -a [ ! -f /etc/dhcp/dhcpd.conf ]; then
is a syntax error. It should be this:
if [ -f /etc/dhcpd.conf -a ! -f /etc/dhcp/dhcpd.conf ]; then
Wow, that's embarrassing. The spec file I have local does not match what I actually built. Sorry about that.
New one built.
config: line in /etc/rc.d/init.d/dhcpd in 4.1.0-3.fc11 still says /etc/dhcpd.conf when it should say /etc/dhcp/dhcpd.conf.
Seriously, I must be completely incapable of working with shell scripts. Ask me to hack C or Python all day and I can do that. For some reason, I forget things in shell.
Really, I'm just doing this for your amusement because at the Fedora Project, your entertainment comes first.