Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nathaniel Roach <nroach44@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/dhcp: Only install the relevant unit file
Date: Mon,  1 Dec 2014 22:18:16 +0800	[thread overview]
Message-ID: <1417443496-9198-1-git-send-email-nroach44@gmail.com> (raw)

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.

Signed-off-by: Nathaniel Roach <nroach44@gmail.com>
---
 package/dhcp/dhcp.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/dhcp/dhcp.mk b/package/dhcp/dhcp.mk
index 1eb6b32..2aa690f 100644
--- a/package/dhcp/dhcp.mk
+++ b/package/dhcp/dhcp.mk
@@ -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)
-- 
2.1.3

             reply	other threads:[~2014-12-01 14:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-01 14:18 Nathaniel Roach [this message]
2014-12-01 14:20 ` [Buildroot] [PATCH 1/1] package/dhcp: Only install the relevant unit file Gustavo Zacarias
2014-12-07 20:55 ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1417443496-9198-1-git-send-email-nroach44@gmail.com \
    --to=nroach44@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox