From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] busybox: Install udhcpc script only if enabled
Date: Sat, 11 Jul 2015 18:08:04 +0200 [thread overview]
Message-ID: <55A13F64.7060004@mind.be> (raw)
In-Reply-To: <1436629865-19506-1-git-send-email-maxime.hadjinlian@gmail.com>
On 07/11/15 17:51, Maxime Hadjinlian wrote:
> It doesn't make sense to install such a scripts if UDHCPC was not
> selected.
> Also remove the entry from BUSYBOX_PERMISSIONS as the install command
> does the same job.
>
> Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Regards,
Arnout
> ---
> package/busybox/busybox.mk | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
> index 51b35bc..92874cd 100644
> --- a/package/busybox/busybox.mk
> +++ b/package/busybox/busybox.mk
> @@ -52,7 +52,6 @@ BUSYBOX_KCONFIG_OPTS = $(BUSYBOX_MAKE_OPTS)
>
> define BUSYBOX_PERMISSIONS
> /bin/busybox f 4755 0 0 - - - - -
> - /usr/share/udhcpc/default.script f 755 0 0 - - - - -
> endef
>
> # If mdev will be used for device creation enable it and copy S10mdev to /etc/init.d
> @@ -127,6 +126,15 @@ define BUSYBOX_INTERNAL_SHADOW_PASSWORDS
> endef
> endif
>
> +define BUSYBOX_INSTALL_UDHCPC_SCRIPT
> + if grep -q CONFIG_UDHCPC=y $(@D)/.config; then \
> + $(INSTALL) -m 0755 -D package/busybox/udhcpc.script \
> + $(TARGET_DIR)/usr/share/udhcpc/default.script; \
> + $(INSTALL) -m 0755 -d \
> + $(TARGET_DIR)/usr/share/udhcpc/default.script.d; \
> + fi
> +endef
> +
> ifeq ($(BR2_INIT_BUSYBOX),y)
> define BUSYBOX_SET_INIT
> $(call KCONFIG_ENABLE_OPT,CONFIG_INIT,$(BUSYBOX_BUILD_CONFIG))
> @@ -189,10 +197,7 @@ endef
>
> define BUSYBOX_INSTALL_TARGET_CMDS
> $(BUSYBOX_MAKE_ENV) $(MAKE) $(BUSYBOX_MAKE_OPTS) -C $(@D) install
> - $(INSTALL) -m 0755 -D package/busybox/udhcpc.script \
> - $(TARGET_DIR)/usr/share/udhcpc/default.script
> - $(INSTALL) -m 0755 -d \
> - $(TARGET_DIR)/usr/share/udhcpc/default.script.d
> + $(BUSYBOX_INSTALL_UDHCPC_SCRIPT)
> $(BUSYBOX_INSTALL_MDEV_CONF)
> endef
>
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
next prev parent reply other threads:[~2015-07-11 16:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-11 15:51 [Buildroot] [PATCH] busybox: Install udhcpc script only if enabled Maxime Hadjinlian
2015-07-11 16:08 ` Arnout Vandecappelle [this message]
2015-07-11 22:25 ` 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=55A13F64.7060004@mind.be \
--to=arnout@mind.be \
--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