Red Hat Bugzilla – Bug 471874
dhcp initscript creates leases file in wrong location
Last modified: 2009-05-18 16:06:33 EDT
Description of problem:
/etc/init.d/dhcpd creates an empty leases file in /var/lib/dhcpd. dhcpd looks for it in /var/lib/dhcp and won't start.
Version-Release number of selected component (if applicable): 3.0.1-62.EL4
Steps to Reproduce:
1. Install/update to dhcp-3.0.1-62.EL4
2. Shut down dhcpd
3. Delete leases file from /var/lib/dhcp/dhcpd.leases
4. Attempt to restart dhcpd
dhcpd fails to start
It looks like the initscript has changed since an earlier version, as this used to work. In fact, the current version looks for and creates the leases file in the wrong location, then sets the selinux context for the file in the right location.
This is a regression and easy enough to fix in the init script.
RCS file: /cvs/dist/rpms/dhcp/RHEL-4/dhcpd.init,v
retrieving revision 1.15
diff -u -p -r1.15 dhcpd.init
--- dhcpd.init 15 Feb 2008 00:39:18 -0000 1.15
+++ dhcpd.init 17 Nov 2008 19:47:59 -0000
@@ -33,9 +33,9 @@ fi
[ -f "$CF" ] || exit 0
-if [ ! -f /var/lib/dhcpd/dhcpd.leases ] ; then
- mkdir -p /var/lib/dhcpd
- touch /var/lib/dhcpd/dhcpd.leases
+if [ ! -f /var/lib/dhcp/dhcpd.leases ] ; then
+ mkdir -p /var/lib/dhcp
+ touch /var/lib/dhcp/dhcpd.leases
[ -x /sbin/restorecon ] && [ -d /selinux ] && /sbin/restorecon /var/lib/dhcp/dhcpd.leases >/dev/null 2>&1
This bugzilla has Keywords: Regression.
Since no regressions are allowed between releases,
it is also being proposed as a blocker for this release.
Please resolve ASAP.
Can I get a qa-ack on this bug? I'm not sure how the change to /var/lib/dhcpd slipped in to the RHEL-4 branch, but it shouldn't have. All I want to do is revert the init script back to using /var/lib/dhcp. dhcp is currently built that way on RHEL-4 and I don't want to rebuild it to start using /var/lib/dhcpd at this point either.
Fix will be in dhcp-3.0.1-63.EL4
VERIFIED that dhcp-3.0.1-64.EL4 will create empty leases file under /var/lib/dhcp/dhcpd.leases
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.