From patchwork Sun Oct 27 13:00:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 1185007 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="BQptF1bY"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 471HyK2Yjdz9sCJ for ; Mon, 28 Oct 2019 00:00:24 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 53DEB855F1; Sun, 27 Oct 2019 13:00:22 +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 vZ6VJXokSawu; Sun, 27 Oct 2019 13:00:21 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 6435485606; Sun, 27 Oct 2019 13:00:21 +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 418ED1BF41D for ; Sun, 27 Oct 2019 13:00:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 3E1B2203AB for ; Sun, 27 Oct 2019 13:00:16 +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 pu-J0i9cpQ-Q for ; Sun, 27 Oct 2019 13:00:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qt1-f194.google.com (mail-qt1-f194.google.com [209.85.160.194]) by silver.osuosl.org (Postfix) with ESMTPS id 657E6203A9 for ; Sun, 27 Oct 2019 13:00:15 +0000 (UTC) Received: by mail-qt1-f194.google.com with SMTP id o3so10601267qtj.8 for ; Sun, 27 Oct 2019 06:00:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=YRLWg/K+DZIA3ghpkBsv6/+8TGPjMZMg8hmjmP234tQ=; b=BQptF1bYtipjE9xCvqKG5s++XGl5a5blVeJbJPrfcS7GAwx0zdMd2FIOxD7/5LLhD4 K+8W1WZU0FbOkRkAxHKsdWpdKr6bR3IZ7244f1+rBTN0nENJADb9HNpjf0Cllou+AQIJ jICXwtZQwHJt1a4SMweTNFigpdV+iwBtLE0sJmfB1tpxIEExucvzTiMuW3dHwnqKktqY 2grw8QRfhqV1bTQGidZFgL+YkewYXeqdU8FTITKMrdvGqz5sAuH1HVDMXviAL6B1zlL9 wY9Bv1NpXxvDSlgXGRdAv2HQUsE/S8JdTrq3ZBBvdTcf8LPJ3m8O6bISkjR5L3V4kntR BTog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=YRLWg/K+DZIA3ghpkBsv6/+8TGPjMZMg8hmjmP234tQ=; b=HxgpcNB7iVjbjWbykbZCJBOLXvi2pTrErGGq/WPKauUQRpUGTJs0RyCVdKYuCR+k/9 gJeXMULjUP3/VGGQzYQqEfAxS1rXrDaa66zETlZJ2Hzxf+LOJITkhV+w45zq3gAbC/Tw dYR6VoVi5e5yGU+4GiHw0SW7sKbS4NoRnTIZ/QwElKRjoQVbcRd7MqIV15e+FJU2yksr 7Y6hg0vxwR1JvexlCzpcTqHX7w3aL1LOz6NBvowel4aWfeYhfQf1ERm2dU0CVT7mtf6E 36DJY3Xsg+6MrmiEh77MFLEjLwwpizNTeG0eoHucWgEXLX7t8e0xa/dtb13aZn/CUhQc 362A== X-Gm-Message-State: APjAAAWAu/geDUeJig7n1tQb/uojSQfSnSAY0JGUArrmYwhelgZEqKtF 2GVUx6UfbTZguw+3AI0+p+8bDEhcE0g= X-Google-Smtp-Source: APXvYqziew/bi1eyz3PDzqum0TyOdZZmuVRnxuJ1RNwRdzWFmn47VWvqcTOubtwPJQHQxiK/nxJvJw== X-Received: by 2002:a0c:fe87:: with SMTP id d7mr745105qvs.234.1572181213932; Sun, 27 Oct 2019 06:00:13 -0700 (PDT) Received: from casantos.casantos.org ([191.32.127.90]) by smtp.gmail.com with ESMTPSA id u189sm4361165qkd.62.2019.10.27.06.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Oct 2019 06:00:13 -0700 (PDT) From: unixmania@gmail.com To: buildroot@buildroot.org Date: Sun, 27 Oct 2019 10:00:07 -0300 Message-Id: <20191027130007.3006-1-unixmania@gmail.com> X-Mailer: git-send-email 2.18.1 Subject: [Buildroot] [PATCH] package/sysvinit: comment out login line in inittab if getty is 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 MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Carlos Santos When the "Run a getty" option is disabled, sysvinit doesn't remove the /etc/inittab line from previous builds. With this patch, the line is correctly commented out. Based on similar change made by Stephen Bos and Christophe Blaess for busybox. Signed-off-by: Carlos Santos --- package/sysvinit/sysvinit.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/package/sysvinit/sysvinit.mk b/package/sysvinit/sysvinit.mk index 98a37fc760..c778a9cde5 100644 --- a/package/sysvinit/sysvinit.mk +++ b/package/sysvinit/sysvinit.mk @@ -36,8 +36,13 @@ define SYSVINIT_SET_GETTY $(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(shell echo $(SYSTEM_GETTY_PORT) | tail -c+4)::respawn:/sbin/getty -L $(SYSTEM_GETTY_OPTIONS) $(SYSTEM_GETTY_PORT) $(SYSTEM_GETTY_BAUDRATE) $(SYSTEM_GETTY_TERM) #~' \ $(TARGET_DIR)/etc/inittab endef -SYSVINIT_TARGET_FINALIZE_HOOKS += SYSVINIT_SET_GETTY +else +define SYSVINIT_SET_GETTY + $(SED) '/# GENERIC_SERIAL$$/s~^.*#~# S0:1:respawn:/sbin/getty -L ttyS0 115200 vt100 #~' \ + $(TARGET_DIR)/etc/inittab +endef endif # BR2_TARGET_GENERIC_GETTY +SYSVINIT_TARGET_FINALIZE_HOOKS += SYSVINIT_SET_GETTY SYSVINIT_TARGET_FINALIZE_HOOKS += SYSTEM_REMOUNT_ROOT_INITTAB