package/dhcp: Only install the relevant unit file
PATCH 1/1 package/dhcp: Only install the relevant unit file
Previous to this patch, if BR2_PACKAGE_DHCP_CLIENT was selected, dhcpd.service was installed to the target on systemd systems.
On the resultant system, this would mean that systemctl would show an error starting dhcpd.service, as the requisite files do not exist. This does not cause issue on sysvinit systems as the init scripts silently error when the files aren't found.
Fix this by adding a conditional check to the install define.
--- package/dhcp/dhcp.mk | 2 ++ 1 file changed, 2 insertions(+)
package/dhcp/dhcp.mk +2 -0
@@ -75,6 +75,7 @@ define DHCP_INSTALL_INIT_SYSV $(TARGET_DIR)/etc/init.d/S80dhcp-relay endef +ifeq ($(BR2_PACKAGE_DHCP_SERVER),y) define DHCP_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/dhcp/dhcpd.service \ $(TARGET_DIR)/lib/systemd/system/dhcpd.service
@@ -89,6 +90,7 @@ define DHCP_INSTALL_INIT_SYSTEMD echo "f /var/lib/dhcp/dhcpd.leases - - - - -" >> \ $(TARGET_DIR)/usr/lib/tmpfiles.d/dhcpd.conf endef +endif define DHCP_INSTALL_TARGET_CMDS $(DHCP_INSTALL_RELAY)
Signature · 1 line
2.1.3
PATCH 1/1 package/dhcp: Only install the relevant unit file
Quoted 11 lines · Nathaniel Roach
Previous to this patch, if
BR2_PACKAGE_DHCP_CLIENTwas selected, dhcpd.service was installed to the target on systemd systems.On the resultant system, this would mean that systemctl would show an error starting dhcpd.service, as the requisite files do not exist. This does not cause issue on sysvinit systems as the init scripts silently error when the files aren't found.
Fix this by adding a conditional check to the install define.
Signed-off-by Nathaniel Roach <[email protected]>
Thomas Petazzoni
AppliedPATCH 1/1 package/dhcp: Only install the relevant unit file
In reply to Nathaniel RoachDear Nathaniel Roach,
Quoted 8 lines · Nathaniel Roach
Previous to this patch, if
BR2_PACKAGE_DHCP_CLIENTwas selected, dhcpd.service was installed to the target on systemd systems.On the resultant system, this would mean that systemctl would show an error starting dhcpd.service, as the requisite files do not exist. This does not cause issue on sysvinit systems as the init scripts silently error when the files aren't found.
Quoted 6 lines
Fix this by adding a conditional check to the install define.
Signed-off-by Nathaniel Roach <[email protected]>--- package/dhcp/dhcp.mk | 2 ++ 1 file changed, 2 insertions(+)
Applied, thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com