From patchwork Fri Jul 13 03:19:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzu-Jung Lee X-Patchwork-Id: 170769 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 64CFA2C0300 for ; Fri, 13 Jul 2012 13:13:40 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 41AA8A018E; Fri, 13 Jul 2012 03:13:39 +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 dBMpJQkVZtgX; Fri, 13 Jul 2012 03:13:37 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id B2554A0194; Fri, 13 Jul 2012 03:13:37 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id C61498F798 for ; Fri, 13 Jul 2012 03:13:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B55908F9B7 for ; Fri, 13 Jul 2012 03:13:35 +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 UNVDvNUT+J4V for ; Fri, 13 Jul 2012 03:13:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-yx0-f171.google.com (mail-yx0-f171.google.com [209.85.213.171]) by whitealder.osuosl.org (Postfix) with ESMTPS id A41F38F661 for ; Fri, 13 Jul 2012 03:13:32 +0000 (UTC) Received: by yenq11 with SMTP id q11so5769210yen.16 for ; Thu, 12 Jul 2012 20:13:31 -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:x-mailer; bh=ulPrABCX89bk0hfcqIO3ek3aZJzm0cOl+UDtY4PQ/pg=; b=A5dIdMpX4eKsM996zDwSyb16kt5zqp26lnUkicv4XwzS+P2IqU58eKHJlqN8mUzEPr ZoPGEbLIPB1Z1ozO4dHhdG/BI08scnjlAtLrFIx/calWUjH68qp+hItXH58qmIuKBvMM NN3RL+wSYAJTpBGYyyisDBegNjpzbgqY+NslDcC6dqlAgOPyHyQ4/gJK/qibSKRxHLnz qd9rmZYzFeB4kJS/M58tPg3SSpEest66CqskxK4pZPwX+9mKe88Esenw1yiMPWLLi89x P+spkD76zX2mqIcHanvcECO7Vc1xzZOrTKpCB0q1hVwIDniDWjf82pxVLS0Ibkys2RjB RiUw== Received: by 10.66.75.168 with SMTP id d8mr1392717paw.63.1342149211049; Thu, 12 Jul 2012 20:13:31 -0700 (PDT) Received: from tjlee.ambarella.net (60-248-184-238.HINET-IP.hinet.net. [60.248.184.238]) by mx.google.com with ESMTPS id os3sm5060464pbb.41.2012.07.12.20.13.28 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 Jul 2012 20:13:30 -0700 (PDT) From: roylee17@gmail.com To: buildroot@busybox.net Date: Fri, 13 Jul 2012 11:19:05 +0800 Message-Id: <1342149545-10417-1-git-send-email-roylee17@gmail.com> X-Mailer: git-send-email 1.7.8.6 Cc: Tzu-Jung Lee Subject: [Buildroot] [PATCH 1/1] skeleton: add default login port to /etc/securetty 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 From: Tzu-Jung Lee We ran into a "Login incorrect" problem when running the same rootfs image across platforms with different loging ports ttyS0/1/2/3. Simply assignning "console" to BR2_TARGET_GENERIC_GETTY_PORT, which in turn modifies the /etc/inittab, is not enough because the "console" device was missing in the /etc/securetty. While current securetty has enumerated a lot of ttys, this patch should save some efforts to enumerate more. Change-Id: Ifb1239c80eb86528345b24eb8d04b52b67aa1209 Signed-off-by: Tzu-Jung Lee Acked-by: Arnout Vandecappelle (Essensium/Mind) --- target/generic/Makefile.in | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/target/generic/Makefile.in b/target/generic/Makefile.in index 4185202..571b54a 100644 --- a/target/generic/Makefile.in +++ b/target/generic/Makefile.in @@ -31,6 +31,9 @@ target-generic-do-remount-rw: target-generic-dont-remount-rw: $(SED) '/^[^#].*# REMOUNT_ROOTFS_RW$$/s~^~#~' $(TARGET_DIR)/etc/inittab +target-generic-securetty: + grep -q $(TARGET_GENERIC_GETTY) $(TARGET_DIR)/etc/securetty || echo $(TARGET_GENERIC_GETTY) >> $(TARGET_DIR)/etc/securetty + ifneq ($(TARGET_GENERIC_HOSTNAME),) TARGETS += target-generic-hostname endif @@ -50,4 +53,7 @@ TARGETS += target-generic-do-remount-rw else TARGETS += target-generic-dont-remount-rw endif +ifneq ($(TARGET_GENERIC_GETTY),) +TARGETS += target-generic-securetty +endif endif