From patchwork Sat Jul 11 15:51:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Hadjinlian X-Patchwork-Id: 494024 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 051FC1402BE for ; Sun, 12 Jul 2015 01:51:18 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=frpsq0TE; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 7C1F594C3C; Sat, 11 Jul 2015 15:51:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gceGPpTQlMxY; Sat, 11 Jul 2015 15:51:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 9C62294C36; Sat, 11 Jul 2015 15:51:14 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id A52DC1C1FE0 for ; Sat, 11 Jul 2015 15:51:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A1A84A2916 for ; Sat, 11 Jul 2015 15:51:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jfYjH8aMCQjF for ; Sat, 11 Jul 2015 15:51:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 537DAA28EE for ; Sat, 11 Jul 2015 15:51:12 +0000 (UTC) Received: by wiwl6 with SMTP id l6so68970160wiw.0 for ; Sat, 11 Jul 2015 08:51:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=TWn+Owf5UnHPsd6WOxNUTeU368TyP0Eha2XqWkK9/9c=; b=frpsq0TE51MU9KlCFVPLm7HV2snuUweDRAcDx4loA2Yh1xEpPA6hHfrPsuGqPamMfN KpNu5uIQjzYWb/3M5/AQbtX7vo4+kZpDyeIApfop/HfSzRvRzg0AJAzyftqqa/YegQqE li2fCsWz07pJjZP8flt4bYkDJjNTpovAI0ctniYwsoDKDHPYUZouSnMYfhQVNF+4W30Q OF6V8M29Dlkf/J57j58EGuNuNfSXwa4XycbLEvgfEZ2pCVGK2FcRoemJUNKW3jlA9pP+ tLQkc7YMqxppxoVmTRcwnJwnLsXZSO/DRY7cHdCgW/9eImkWmEXGI81Q4jntpLxTywai VGIQ== X-Received: by 10.180.206.147 with SMTP id lo19mr7316497wic.79.1436629870853; Sat, 11 Jul 2015 08:51:10 -0700 (PDT) Received: from cerise.home (AToulouse-657-1-1031-128.w92-134.abo.wanadoo.fr. [92.134.9.128]) by smtp.gmail.com with ESMTPSA id nb9sm4080940wic.10.2015.07.11.08.51.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 11 Jul 2015 08:51:09 -0700 (PDT) From: Maxime Hadjinlian To: buildroot@buildroot.org Date: Sat, 11 Jul 2015 17:51:05 +0200 Message-Id: <1436629865-19506-1-git-send-email-maxime.hadjinlian@gmail.com> X-Mailer: git-send-email 2.1.4 Subject: [Buildroot] [PATCH] busybox: Install udhcpc script only if enabled X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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 Reviewed-by: Arnout Vandecappelle (Essensium/Mind) --- 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