From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/5] busybox: Install scripts only when needed
Date: Tue, 3 Feb 2015 11:31:04 +0100 [thread overview]
Message-ID: <20150203113104.784520a6@free-electrons.com> (raw)
In-Reply-To: <1413643624-14757-3-git-send-email-maxime.hadjinlian@gmail.com>
Dear Maxime Hadjinlian,
On Sat, 18 Oct 2014 16:47:01 +0200, Maxime Hadjinlian wrote:
> Init scripts are only usefull with init system that supports them, it
> means that we don't want init scripts files unless Busybox or SysV has
> been chosen as the init.
>
> Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
> ---
> package/busybox/busybox.mk | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
> index 422a95d..a8b4b24 100644
> --- a/package/busybox/busybox.mk
> +++ b/package/busybox/busybox.mk
> @@ -167,6 +167,7 @@ define BUSYBOX_SET_INIT
> endef
> endif
>
> +ifeq ($(BR2_INIT_SYSV)$(BR2_INIT_BUSYBOX), y)
> define BUSYBOX_INSTALL_LOGGING_SCRIPT
> if grep -q CONFIG_SYSLOGD=y $(@D)/.config; then \
> [ -f $(TARGET_DIR)/etc/init.d/S01logging ] || \
> @@ -174,11 +175,16 @@ define BUSYBOX_INSTALL_LOGGING_SCRIPT
> $(TARGET_DIR)/etc/init.d/S01logging; \
> else rm -f $(TARGET_DIR)/etc/init.d/S01logging; fi
> endef
> +endif
>
> ifeq ($(BR2_PACKAGE_BUSYBOX_WATCHDOG),y)
> define BUSYBOX_SET_WATCHDOG
> $(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG,$(BUSYBOX_BUILD_CONFIG))
> endef
> +endif
> +
> +ifeq ($(BR2_PACKAGE_BUSYBOX_WATCHDOG),y)
> +ifeq ($(BR2_INIT_SYSV)$(BR2_INIT_BUSYBOX), y)
> define BUSYBOX_INSTALL_WATCHDOG_SCRIPT
> [ -f $(TARGET_DIR)/etc/init.d/S15watchdog ] || \
> $(INSTALL) -D -m 0755 package/busybox/S15watchdog \
> @@ -187,6 +193,7 @@ define BUSYBOX_INSTALL_WATCHDOG_SCRIPT
> $(TARGET_DIR)/etc/init.d/S15watchdog
> endef
> endif
> +endif
Are you sure this is actually needed? The
BUSYBOX_INSTALL_LOGGING_SCRIPT and BUSYBOX_INSTALL_WATCHDOG_SCRIPT are
used as follows:
define BUSYBOX_INSTALL_INIT_SYSV
$(BUSYBOX_INSTALL_MDEV_SCRIPT)
$(BUSYBOX_INSTALL_LOGGING_SCRIPT)
$(BUSYBOX_INSTALL_WATCHDOG_SCRIPT)
endef
So they are already only triggered for a sysv or busybox init.
Therefore, I've marked the patch as Rejected in patchwork. If we
misunderstood something, please let us know.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2015-02-03 10:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-18 14:46 [Buildroot] [PATCH 0/5] Various init scripts modification Maxime Hadjinlian
2014-10-18 14:47 ` [Buildroot] [PATCH 1/5] initscripts: new package Maxime Hadjinlian
2015-02-03 10:32 ` Thomas Petazzoni
2014-10-18 14:47 ` [Buildroot] [PATCH 2/5] busybox: Install scripts only when needed Maxime Hadjinlian
2014-10-18 16:53 ` Thomas Petazzoni
2014-10-18 16:54 ` Maxime Hadjinlian
2015-02-03 10:31 ` Thomas Petazzoni [this message]
2014-10-18 14:47 ` [Buildroot] [PATCH 3/5] infra: Add automatic install of init scripts Maxime Hadjinlian
2014-10-18 16:56 ` Thomas Petazzoni
2014-10-18 16:59 ` Maxime Hadjinlian
2014-10-18 17:06 ` Thomas Petazzoni
2014-10-18 17:11 ` Maxime Hadjinlian
2014-10-18 17:23 ` Thomas Petazzoni
2014-10-18 17:02 ` Thomas Petazzoni
2014-10-18 18:52 ` André Erdmann
2014-10-18 14:47 ` [Buildroot] [PATCH 4/5] acpid: Use new FOO_INIT_SYSV_FILES variable Maxime Hadjinlian
2014-10-18 14:47 ` [Buildroot] [PATCH 5/5] am33x-cm3: " Maxime Hadjinlian
2015-02-03 10:29 ` [Buildroot] [PATCH 0/5] Various init scripts modification 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=20150203113104.784520a6@free-electrons.com \
--to=thomas.petazzoni@free-electrons.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