From patchwork Tue Oct 1 13:09:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Blaess X-Patchwork-Id: 1169960 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=logilin.fr Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46jLFz2myGz9sQm for ; Tue, 1 Oct 2019 23:48:38 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 20A3620463; Tue, 1 Oct 2019 13:48:37 +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 Cn-Xyocwu7gV; Tue, 1 Oct 2019 13:48:33 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 77DE32094C; Tue, 1 Oct 2019 13:48:26 +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 598BC1BF981 for ; Tue, 1 Oct 2019 13:48:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 55F4D85F0E for ; Tue, 1 Oct 2019 13:48:25 +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 PCt6CKbUEr3Y for ; Tue, 1 Oct 2019 13:48:23 +0000 (UTC) X-Greylist: delayed 00:19:59 by SQLgrey-1.7.6 Received: from 8.mo68.mail-out.ovh.net (8.mo68.mail-out.ovh.net [46.105.74.219]) by fraxinus.osuosl.org (Postfix) with ESMTPS id AD12F8545B for ; Tue, 1 Oct 2019 13:48:23 +0000 (UTC) Received: from player756.ha.ovh.net (unknown [10.108.57.49]) by mo68.mail-out.ovh.net (Postfix) with ESMTP id 6E623144919 for ; Tue, 1 Oct 2019 15:10:20 +0200 (CEST) Received: from blaess.fr (unknown [90.115.206.145]) (Authenticated sender: christophe@blaess.fr) by player756.ha.ovh.net (Postfix) with ESMTPSA id C28BA99F12FD; Tue, 1 Oct 2019 13:10:15 +0000 (UTC) From: Stephen Bos To: buildroot@buildroot.org Date: Tue, 1 Oct 2019 15:09:48 +0200 Message-Id: <20191001130948.17935-1-mailist@logilin.fr> X-Mailer: git-send-email 2.17.1 X-Ovh-Tracer-Id: 5781496025597880222 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrgeeggdeiudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Subject: [Buildroot] [PATCH 1/1] busybox: write commented login line in /etc/inittab when getty disabled X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Carlos Santos , Christophe Blaess , Stephen Bos , Adam Duskett MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Stephen Bos When the "Run a getty" option is disabled, busybox doesn't remove the /etc/inittab line from previous builds. With this patch, the line is correctly commented out. Signed-off-by: Stephen Bos Co-authored-by: Stephen Bos Co-authored-by: Christophe Blaess --- package/busybox/busybox.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk index a154584592..cc9921dabe 100644 --- a/package/busybox/busybox.mk +++ b/package/busybox/busybox.mk @@ -218,8 +218,12 @@ define BUSYBOX_SET_GETTY $(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(SYSTEM_GETTY_PORT)::respawn:/sbin/getty -L $(SYSTEM_GETTY_OPTIONS) $(SYSTEM_GETTY_PORT) $(SYSTEM_GETTY_BAUDRATE) $(SYSTEM_GETTY_TERM) #~' \ $(TARGET_DIR)/etc/inittab endef -BUSYBOX_TARGET_FINALIZE_HOOKS += BUSYBOX_SET_GETTY +else +define BUSYBOX_SET_GETTY + $(SED) '/# GENERIC_SERIAL$$/s~^.*#~#ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 #~' $(TARGET_DIR)/etc/inittab +endef endif # BR2_TARGET_GENERIC_GETTY +BUSYBOX_TARGET_FINALIZE_HOOKS += BUSYBOX_SET_GETTY BUSYBOX_TARGET_FINALIZE_HOOKS += SYSTEM_REMOUNT_ROOT_INITTAB