summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Cercueil <paul@crapouillou.net>2013-12-17 01:14:54 (GMT)
committer Peter Korsgaard <peter@korsgaard.com>2013-12-17 16:01:53 (GMT)
commitb1e4bf079d8a4dbde5db72f91a7f654f7dbf0030 (patch)
tree516f03732118fe6ac19cda7c931850dce8a88a24
parenta0469f5bac47ec1434fa2e54a01c9f287a729e81 (diff)
downloadbuildroot-b1e4bf079d8a4dbde5db72f91a7f654f7dbf0030.tar.gz
buildroot-b1e4bf079d8a4dbde5db72f91a7f654f7dbf0030.tar.bz2
systemd: Replace busybox' binaries only if applicable
Previously, the package would overwrite busybox' binaries even if Busybox was set in the config as the default init system. Signed-Off-By: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rw-r--r--package/systemd/systemd.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index 4e4955e..a5dc8e5 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -54,6 +54,7 @@ endif
SYSTEMD_MAKE_OPT += LIBS=-lrt
SYSTEMD_MAKE_OPT += LDFLAGS+=-ldl
+ifeq ($(BR2_INIT_SYSTEMD),y)
define SYSTEMD_INSTALL_INIT_HOOK
ln -fs ../usr/lib/systemd/systemd $(TARGET_DIR)/sbin/init
ln -fs ../usr/bin/systemctl $(TARGET_DIR)/sbin/halt
@@ -62,6 +63,9 @@ define SYSTEMD_INSTALL_INIT_HOOK
ln -fs ../../../usr/lib/systemd/system/multi-user.target $(TARGET_DIR)/etc/systemd/system/default.target
endef
+SYSTEMD_POST_INSTALL_TARGET_HOOKS += \
+ SYSTEMD_INSTALL_INIT_HOOK
+endif
define SYSTEMD_INSTALL_TTY_HOOK
rm -f $(TARGET_DIR)/etc/systemd/system/getty.target.wants/getty@tty1.service
@@ -69,7 +73,6 @@ define SYSTEMD_INSTALL_TTY_HOOK
endef
SYSTEMD_POST_INSTALL_TARGET_HOOKS += \
- SYSTEMD_INSTALL_INIT_HOOK \
SYSTEMD_INSTALL_TTY_HOOK \
$(eval $(autotools-package))