Bug 479012 - dhcpd.conf move to /etc/dhcp incomplete
Summary: dhcpd.conf move to /etc/dhcp incomplete
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dhcp
Version: rawhide
Hardware: All
OS: Linux
low
urgent
Target Milestone: ---
Assignee: David Cantrell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-06 14:46 UTC by Jonathan Kamens
Modified: 2009-01-13 14:51 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-13 14:51:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jonathan Kamens 2009-01-06 14:46:05 UTC
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.

Comment 1 David Cantrell 2009-01-08 18:33:44 UTC
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.

Comment 2 Jonathan Kamens 2009-01-09 18:57:42 UTC
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.

Comment 3 Jonathan Kamens 2009-01-11 15:10:15 UTC
This:

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

Comment 4 David Cantrell 2009-01-11 20:17:43 UTC
Wow, that's embarrassing.  The spec file I have local does not match what I actually built.  Sorry about that.

New one built.

Comment 5 Jonathan Kamens 2009-01-13 14:17:10 UTC
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.

Comment 6 David Cantrell 2009-01-13 14:51:59 UTC
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.

Building dhcp-4.1.0-4.fc11.


Note You need to log in before you can comment on or make changes to this bug.