From: Norbert Lange <nolange79@gmail.com>
To: buildroot@buildroot.org
Cc: Norbert Lange <nolange79@gmail.com>,
"Yann E. MORIN" <yann.morin.1998@free.fr>
Subject: [Buildroot] [PATCH v4 2/4] package/systemd: allow empty systemd default target
Date: Fri, 22 Jul 2022 12:16:49 +0200 [thread overview]
Message-ID: <20220722101653.7475-2-nolange79@gmail.com> (raw)
In-Reply-To: <20220722101653.7475-1-nolange79@gmail.com>
Currently, we forcefully require that a default target be specified.
However, systemd does install a default target, but it's not
possible to just use that target.
Allow the user to blank-out the config setting to not override
whatever systemd installed and keep that.
Signed-off-by: Norbert Lange <nolange79@gmail.com>
---
v1->v2:
* completely remove the hook if var is empty
* adjusted commit message
v2->v3:
* v2 was broken, dint want to send it. now fixed/correct
Signed-off-by: Norbert Lange <nolange79@gmail.com>
---
package/systemd/systemd.mk | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index b5628f5155..bacde5221b 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -583,17 +583,20 @@ ifneq ($(SYSTEMD_FALLBACK_HOSTNAME),)
SYSTEMD_CONF_OPTS += -Dfallback-hostname=$(SYSTEMD_FALLBACK_HOSTNAME)
endif
+ifneq ($(call qstrip,$(BR2_PACKAGE_SYSTEMD_DEFAULT_TARGET)),)
define SYSTEMD_INSTALL_INIT_HOOK
ln -fs "$(call qstrip,$(BR2_PACKAGE_SYSTEMD_DEFAULT_TARGET))" \
$(TARGET_DIR)/usr/lib/systemd/system/default.target
endef
+SYSTEMD_POST_INSTALL_TARGET_HOOKS += SYSTEMD_INSTALL_INIT_HOOK
+endif
+
define SYSTEMD_INSTALL_MACHINEID_HOOK
touch $(TARGET_DIR)/etc/machine-id
endef
SYSTEMD_POST_INSTALL_TARGET_HOOKS += \
- SYSTEMD_INSTALL_INIT_HOOK \
SYSTEMD_INSTALL_MACHINEID_HOOK
define SYSTEMD_INSTALL_IMAGES_CMDS
--
2.35.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-07-22 10:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-22 10:16 [Buildroot] [PATCH v4 1/4] package/systemd: bump to version 251.3 Norbert Lange
2022-07-22 10:16 ` Norbert Lange [this message]
2022-07-23 16:47 ` [Buildroot] [PATCH v4 2/4] package/systemd: allow empty systemd default target Yann E. MORIN
2022-07-22 10:16 ` [Buildroot] [PATCH v4 3/4] package/systemd: allow package to be used without init system Norbert Lange
2022-07-22 10:16 ` [Buildroot] [PATCH v4 4/4] system: Warn if systemd is used with kernel < 4.15 Norbert Lange
2022-07-22 19:05 ` [Buildroot] [PATCH v4 1/4] package/systemd: bump to version 251.3 James Hilliard
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=20220722101653.7475-2-nolange79@gmail.com \
--to=nolange79@gmail.com \
--cc=buildroot@buildroot.org \
--cc=yann.morin.1998@free.fr \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.