From: Michael Grzeschik <m.grzeschik@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH 1/3] busybox: don't install /sbin/init link if busybox is not the initmethod
Date: Fri, 3 Aug 2018 15:33:54 +0200 [thread overview]
Message-ID: <20180803133356.4177-2-m.grzeschik@pengutronix.de> (raw)
In-Reply-To: <20180803133356.4177-1-m.grzeschik@pengutronix.de>
This patch fixes the case where we use other initmethod then busybox and
want to enable the applet, but don't want to install the link. This is
useful to create busybox based lxc containers.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
rules/busybox.make | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/rules/busybox.make b/rules/busybox.make
index 28d61f5ef..970ac6b4d 100644
--- a/rules/busybox.make
+++ b/rules/busybox.make
@@ -92,6 +92,13 @@ endif
# Target-Install
# ----------------------------------------------------------------------------
+BUSYBOX_APPLETS_ = $(shell cat $(BUSYBOX_PKGDIR)/etc/busybox.links)
+
+ifndef PTXCONF_INITMETHOD_BBINIT
+BUSYBOX_RM_TEMPLTE = "/sbin/init"
+endif
+BUSYBOX_APPLETS = $(filter-out $(BUSYBOX_RM_TEMPLATE),$(BUSYBOX_APPLETS_))
+
$(STATEDIR)/busybox.targetinstall:
@$(call targetinfo)
@@ -107,7 +114,7 @@ ifdef PTXCONF_BUSYBOX_FEATURE_INDIVIDUAL
#
@$(call install_lib, busybox, 0, 0, 0644, libbusybox)
- @cat $(BUSYBOX_PKGDIR)/etc/busybox.links | while read link; do \
+ @for link in $(BUSYBOX_APPLETS); do \
$(call install_copy, busybox, 0, 0, 755, \
"$(BUSYBOX_PKGDIR)/usr/lib/busybox/$${link##*/}", "/usr$${link}"); \
done
@@ -123,7 +130,7 @@ endif
else
@$(call install_copy, busybox, 0, 0, 755, -, /usr/bin/busybox)
endif
- @cat $(BUSYBOX_PKGDIR)/etc/busybox.links | while read link; do \
+ @for link in $(BUSYBOX_APPLETS); do \
case "$${link}" in \
/bin/*) to="busybox" ;; \
/*/*) to="../bin/busybox" ;; \
--
2.18.0
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2018-08-03 13:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-03 13:33 [ptxdist] [PATCH 0/3] lxc: add support in ptxdist Michael Grzeschik
2018-08-03 13:33 ` Michael Grzeschik [this message]
2018-08-03 15:04 ` [ptxdist] [PATCH 1/3] busybox: don't install /sbin/init link if busybox is not the initmethod Michael Grzeschik
2018-08-03 13:33 ` [ptxdist] [PATCH 2/3] lxc: add new package Michael Grzeschik
2018-08-04 9:17 ` Michael Grzeschik
2018-08-03 13:33 ` [ptxdist] [PATCH 3/3] host-lxc: add new hostside package Michael Grzeschik
2018-08-03 15:05 ` Michael Grzeschik
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=20180803133356.4177-2-m.grzeschik@pengutronix.de \
--to=m.grzeschik@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/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