From patchwork Sun Jul 12 18:44:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Hadjinlian X-Patchwork-Id: 494162 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id BBC861402D6 for ; Mon, 13 Jul 2015 04:45:14 +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=jIMO5k0s; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 9652932DEE; Sun, 12 Jul 2015 18:45:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IZ8llU2Mt91P; Sun, 12 Jul 2015 18:45:11 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 55898332F5; Sun, 12 Jul 2015 18:45:11 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 769181C0593 for ; Sun, 12 Jul 2015 18:45:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 7372E332F5 for ; Sun, 12 Jul 2015 18:45:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4G3+VfIiDxIW for ; Sun, 12 Jul 2015 18:45:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) by silver.osuosl.org (Postfix) with ESMTPS id 8F3E832DEE for ; Sun, 12 Jul 2015 18:45:09 +0000 (UTC) Received: by wgjx7 with SMTP id x7so281086204wgj.2 for ; Sun, 12 Jul 2015 11:45:08 -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=m9Gu99AasW1zctHgbz0LmWdkjNqiQerJHlyYLAnbMok=; b=jIMO5k0sZr7kh/iz9tSFPhmN7RPQDHgn5TfvKJch9zSz17vo4bEVRCcMh0n4HrH8gD seqUflMpt4BQvWlqGpH1iIEzS0GOF7+oeBi9fPVPs+WxpqNEv0nC9twwxzgGZ/We0qpV XWuuM6VHZCyWTf8bv9ig0EqKkf6nIz59yRar8jTAD+VZa7G8L9uSn/0qJqCrIWFzY4ZT bPv+9sQvZvJi+XAvd6L0tstBxqUm4MFv4BV70ekRs0ynw5NzrLr8SQiVKKlbmwaIZSm1 JqiFFNTl1WK2LyBM4HNq//wQJq0+iOiWzu7TcJ1MurToLySph8jC+Ur9K5c+kz54r5B0 1iJw== X-Received: by 10.180.21.169 with SMTP id w9mr16107684wie.73.1436726708320; Sun, 12 Jul 2015 11:45:08 -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 ev8sm24676751wjb.8.2015.07.12.11.45.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 12 Jul 2015 11:45:07 -0700 (PDT) From: Maxime Hadjinlian To: buildroot@buildroot.org Date: Sun, 12 Jul 2015 20:44:56 +0200 Message-Id: <1436726698-17776-1-git-send-email-maxime.hadjinlian@gmail.com> X-Mailer: git-send-email 2.1.4 Subject: [Buildroot] [PATCH v5 1/3] busybox: Install scripts only when needed 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" 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 --- v1 -> v2: - Remove non needed space in ifeq (Thomas Petazzoni) --- package/busybox/busybox.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk index 92874cd..5602fb1 100644 --- a/package/busybox/busybox.mk +++ b/package/busybox/busybox.mk @@ -141,17 +141,23 @@ 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 \ $(INSTALL) -m 0755 -D package/busybox/S01logging \ $(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 $(INSTALL) -D -m 0755 package/busybox/S15watchdog \ $(TARGET_DIR)/etc/init.d/S15watchdog @@ -167,6 +173,7 @@ define BUSYBOX_LINUX_PAM endef BUSYBOX_DEPENDENCIES += linux-pam endif +endif # Enable "noclobber" in install.sh, to prevent BusyBox from overwriting any # full-blown versions of apps installed by other packages with sym/hard links.