summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-11-20 17:42:34 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2016-11-25 01:49:36 +0100
commitb0f23d1e562e753cb78a473fdade956a25cc337b (patch)
treefe4a5908d1e39e24ec6df66052e866ed72421a79 /mk
parent49a817b44be5695a87f6b4c8eadef3bb0f9419f9 (diff)
finalize systemd as alternative init system
Most important is the fix in patch-src_journal_journald-server_c, which breaks startup of systemd-journald when code is compiled with -DNDEBUG. A lot of base-files reorganizing to only install required files on sysv systems.
Diffstat (limited to 'mk')
-rw-r--r--mk/image.mk9
-rw-r--r--mk/package.mk2
2 files changed, 10 insertions, 1 deletions
diff --git a/mk/image.mk b/mk/image.mk
index b880e48af..272c21709 100644
--- a/mk/image.mk
+++ b/mk/image.mk
@@ -72,6 +72,15 @@ image-prepare-post:
$(SED) '/^root:/s!:/bin/sh$$!:${ROOTSH}!' ${TARGET_DIR}/etc/passwd
-rm -f ${TARGET_DIR}/bin/sh
ln -sf ${BINSH} ${TARGET_DIR}/bin/sh
+
+ifeq ($(ADK_RUNTIME_INIT_SYSTEMD),y)
+ ln -fs ../usr/${ADK_TARGET_LIBC_PATH}/systemd/systemd $(TARGET_DIR)/sbin/init
+ ln -fs ../usr/bin/systemctl $(TARGET_DIR)/sbin/halt
+ ln -fs ../usr/bin/systemctl $(TARGET_DIR)/sbin/poweroff
+ ln -fs ../usr/bin/systemctl $(TARGET_DIR)/sbin/reboot
+ ln -fs ../../../lib/systemd/system/multi-user.target \
+ $(TARGET_DIR)/etc/systemd/system/default.target
+endif
test -z $(GIT) || \
$(GIT) log -1|head -1|sed -e 's#commit ##' \
> $(TARGET_DIR)/etc/.adkgithash
diff --git a/mk/package.mk b/mk/package.mk
index 88c08cba9..efcb18315 100644
--- a/mk/package.mk
+++ b/mk/package.mk
@@ -244,7 +244,7 @@ endif
@rm -f '$${STAGING_PKG_DIR}/$(1)'
ifeq (,$(filter nostaging,$(7)))
@-cd $${IDIR_$(1)}; \
- x=$$$$(find tmp var -mindepth 1 2>/dev/null); if [[ -n $$$$x ]]; then \
+ x=$$$$(find tmp run -mindepth 1 2>/dev/null); if [[ -n $$$$x ]]; then \
echo 'WARNING: $${IPKG_$(1)} installs files into a' \
'ramdisk location:' >&2; \
echo "$$$$x" | sed 's/^/- /' >&2; \