Bug 479012 - dhcpd.conf move to /etc/dhcp incomplete
dhcpd.conf move to /etc/dhcp incomplete
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: dhcp (Show other bugs)
rawhide
All Linux
low Severity urgent
: ---
: ---
Assigned To: David Cantrell
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-06 09:46 EST by Jonathan Kamens
Modified: 2009-01-13 09:51 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-13 09:51:59 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jonathan Kamens 2009-01-06 09:46:05 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.
Comment 1 David Cantrell 2009-01-08 13:33:44 EST
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 13:57:42 EST
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 10:10:15 EST
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 15:17:43 EST
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 09:17:10 EST
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 09:51:59 EST
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.