Comment 3 for bug 776945

Revision history for this message
Adam Gandelman (gandelman-a) wrote :

The permission error is due to the fact that dhcpd is being started with no arguments and attempting to create the .pid file in a directory it does not have access to. If instead, it is started as 'dhcpd -pf /var/run/dhcp-server/dhcpd.pid' it will succeed in creating its pid file and reading its default configuration /etc/dhcpd.conf (regardless of how dhcpd.conf was generated). The isc-dhcp-server init script takes care of these details and ensures the daemon is being started with the correct defaults (which also use /etc/dhcp/dhcpd.conf instead of /etc/dhcpd.conf)

Furthermore, the location of the Cobbler generated dhcpd.conf appears to not even be configurable anymore (since natty, at least). Instead, cobbler contains logic to determine where to put this based on distro and relies on distro supplied init scripts to the rest:

/usr/lib/python2.7/dist-packages/cobbler/utils.py:

def dhcpconf_location(api):
    version = api.os_version
    if version[0] in [ "redhat", "centos" ] and version[1] < 6:
        return "/etc/dhcpd.conf"
    elif version[0] in [ "fedora" ] and version[1] < 11:
        return "/etc/dhcpd.conf"
    else:
        return "/etc/dhcp/dhcpd.conf"