dhcp: Fix config files paths
PATCH 1/2 dhcp: Fix config files paths
The built dhcp binaries and the installed startup scripts used configuration files under /etc/, but the configuration files were installed under /etc/dhcp/. Fix everything to have configuration files under /etc/dhcp/.
--- package/dhcp/S80dhcp-server | 2 +- package/dhcp/dhcp.mk | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-)
package/dhcp/S80dhcp-server +1 -1
@@ -9,7 +9,7 @@ INTERFACES="" # Sanity checks test -f /usr/sbin/dhcpd || exit 0 -test -f /etc/dhcpd.conf || exit 0 +test -f /etc/dhcp/dhcpd.conf || exit 0 test -n "$INTERFACES" || exit 0 case "$1" in
package/dhcp/dhcp.mk +4 -1
@@ -9,7 +9,10 @@ DHCP_SITE = http://ftp.isc.org/isc/dhcp/$(DHCP_VERSION) DHCP_INSTALL_STAGING = YES DHCP_LICENSE = ISC DHCP_LICENSE_FILES = LICENSE -DHCP_CONF_ENV = ac_cv_file__dev_random=yes +DHCP_CONF_ENV = \ + CPPFLAGS='-D_PATH_DHCPD_CONF=\"/etc/dhcp/dhcpd.conf\" \ + -D_PATH_DHCLIENT_CONF=\"/etc/dhcp/dhclient.conf\"' \ + ac_cv_file__dev_random=yes DHCP_CONF_OPT = \ --localstatedir=/var/lib/dhcp \ --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
Signature · 1 line
1.9.1
PATCH 2/2 dhcp: Fix IPv6 files paths
Use IPv6 file locations consistent with those set for IPv4 instead of keeping the defaults, which use different locations.
--- package/dhcp/dhcp.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
package/dhcp/dhcp.mk +6 -1
@@ -16,10 +16,15 @@ DHCP_CONF_ENV = \ DHCP_CONF_OPT = \ --localstatedir=/var/lib/dhcp \ --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \ + --with-srv6-lease-file=/var/lib/dhcp/dhcpd6.leases \ --with-cli-lease-file=/var/lib/dhcp/dhclient.leases \ + --with-cli6-lease-file=/var/lib/dhcp/dhclient6.leases \ --with-srv-pid-file=/var/run/dhcpd.pid \ + --with-srv6-pid-file=/var/run/dhcpd6.pid \ --with-cli-pid-file=/var/run/dhclient.pid \ - --with-relay-pid-file=/var/run/dhcrelay.pid + --with-cli6-pid-file=/var/run/dhclient6.pid \ + --with-relay-pid-file=/var/run/dhcrelay.pid \ + --with-relay6-pid-file=/var/run/dhcrelay6.pid ifeq ($(BR2_PACKAGE_DHCP_SERVER_DELAYED_ACK),y) DHCP_CONF_OPT += --enable-delayed-ack
Signature · 1 line
1.9.1
PATCH 1/2 dhcp: Fix config files paths
In reply to Benoît ThébaudeauDear Beno?t Th?baudeau,
Quoted 9 lines · Beno?t Th?baudeau
The built dhcp binaries and the installed startup scripts used configuration files under
/etc/, but the configuration files were installed under/etc/dhcp/. Fix everything to have configuration files under/etc/dhcp/.Signed-off-by Beno?t Th?baudeau <[email protected]>--- package/dhcp/S80dhcp-server | 2 +- package/dhcp/dhcp.mk | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-)
Both patches applied, thanks.
As Gustavo rightfully pointed out, it would be nice to be able to define the value of INTERFACES without modifying the init script itself, for example using a /etc/default/dhcpd file. But this needs to be part of a more global work on our initscripts and skeleton.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com