From patchwork Tue Dec 17 01:14:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 301954 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 7168D2C0091 for ; Tue, 17 Dec 2013 12:18:44 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7DC648B56C; Tue, 17 Dec 2013 01:18:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7sPRTSgqc-62; Tue, 17 Dec 2013 01:18:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 9B7688B4ED; Tue, 17 Dec 2013 01:18:42 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 964941BFA82 for ; Tue, 17 Dec 2013 01:18:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 93ACB933A3 for ; Tue, 17 Dec 2013 01:18:41 +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 FQt-D7W0OgzU for ; Tue, 17 Dec 2013 01:18:40 +0000 (UTC) X-Greylist: delayed 00:05:32 by SQLgrey-1.7.6 Received: from marvin.crapouillou.net (rev33.vpn.fdn.fr [80.67.179.33]) by hemlock.osuosl.org (Postfix) with ESMTPS id 926DA8AD98 for ; Tue, 17 Dec 2013 01:18:40 +0000 (UTC) Received: from acaen-252-1-215-135.w86-215.abo.wanadoo.fr ([86.215.59.135] helo=debian.home) by marvin.crapouillou.net with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA256:128) (Exim 4.80) (envelope-from ) id 1VsjFe-0002Hp-Pc; Tue, 17 Dec 2013 02:15:10 +0100 From: Paul Cercueil To: buildroot@busybox.net Date: Tue, 17 Dec 2013 02:14:54 +0100 Message-Id: <1387242894-4966-1-git-send-email-paul@crapouillou.net> X-Mailer: git-send-email 1.8.5.1 Cc: Paul Cercueil Subject: [Buildroot] [PATCH] systemd: Replace busybox' binaries only if applicable X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 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-bounces@busybox.net Previously, the package would overwrite busybox' binaries even if Busybox was set in the config as the default init system. Signed-Off-By: Paul Cercueil --- package/systemd/systemd.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk index 4e4955e..a5dc8e5 100644 --- a/package/systemd/systemd.mk +++ b/package/systemd/systemd.mk @@ -54,6 +54,7 @@ endif SYSTEMD_MAKE_OPT += LIBS=-lrt SYSTEMD_MAKE_OPT += LDFLAGS+=-ldl +ifeq ($(BR2_INIT_SYSTEMD),y) define SYSTEMD_INSTALL_INIT_HOOK ln -fs ../usr/lib/systemd/systemd $(TARGET_DIR)/sbin/init ln -fs ../usr/bin/systemctl $(TARGET_DIR)/sbin/halt @@ -62,6 +63,9 @@ define SYSTEMD_INSTALL_INIT_HOOK ln -fs ../../../usr/lib/systemd/system/multi-user.target $(TARGET_DIR)/etc/systemd/system/default.target endef +SYSTEMD_POST_INSTALL_TARGET_HOOKS += \ + SYSTEMD_INSTALL_INIT_HOOK +endif define SYSTEMD_INSTALL_TTY_HOOK rm -f $(TARGET_DIR)/etc/systemd/system/getty.target.wants/getty@tty1.service @@ -69,7 +73,6 @@ define SYSTEMD_INSTALL_TTY_HOOK endef SYSTEMD_POST_INSTALL_TARGET_HOOKS += \ - SYSTEMD_INSTALL_INIT_HOOK \ SYSTEMD_INSTALL_TTY_HOOK \ $(eval $(autotools-package))