dhcpd ignores $CONFIG_FILE in /etc/default/isc-dhcp-server
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
isc-dhcp (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Package isc-dhcp-server 4.3.3 on Ubuntu 16.04 LTS.
On earlier (pre-systemd) systems, one could point dhcpd at a configuration file in any location by setting CONFIG_
In more formulaeic terms:
Put CONFIG_
I expect that when service isc-dhcp-server is next started, it will use that configuration file.
In fact it still uses /etc/dhcp/
The problem can be worked around by making /etc/dhcp/
The offending code is in /lib/systemd/
[Service]
EnvironmentFile
RuntimeDirector
# The leases files need to be root:dhcpd even when dropping privileges
ExecStart=/bin/sh -ec '\
CONFIG_
if [ -f /etc/ltsp/
[ -e /var/lib/
chown root:dhcpd /var/lib/dhcp /var/lib/
chmod 775 /var/lib/dhcp ; chmod 664 /var/lib/
exec dhcpd -user dhcpd -group dhcpd -f -4 -pf /run/dhcp-
/etc/default/
One fix might be to change the first few lines of the ExecStart to check whether $CONFIG_FILE has been set, and perhaps whether it is still the default value:
ExecStart=/bin/sh -ec '\
case $CONFIG_FILE in \
""|
if [ -f /etc/ltsp/
;; \
esac
Or it might make more sense to let whatever package is in charge of ltsp configuration append CONFIG_
ExecStart=/bin/sh -ec '\
CONFIG_
Either way, a fix would be appreciated.