From patchwork Thu Nov 22 23:36:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Mendoza-Jonas X-Patchwork-Id: 1002060 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 431G7f5dVnz9s0t for ; Fri, 23 Nov 2018 10:37:18 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mendozajonas.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mendozajonas.com header.i=@mendozajonas.com header.b="h9bLyJQO"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="yxVa9/35"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 431G7d5BHXzDqSJ for ; Fri, 23 Nov 2018 10:37:17 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=mendozajonas.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mendozajonas.com header.i=@mendozajonas.com header.b="h9bLyJQO"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="yxVa9/35"; dkim-atps=neutral X-Original-To: petitboot@lists.ozlabs.org Delivered-To: petitboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=mendozajonas.com (client-ip=66.111.4.28; helo=out4-smtp.messagingengine.com; envelope-from=sam@mendozajonas.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=mendozajonas.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=mendozajonas.com header.i=@mendozajonas.com header.b="h9bLyJQO"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="yxVa9/35"; dkim-atps=neutral Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 431G7517bGzDqS1 for ; Fri, 23 Nov 2018 10:36:48 +1100 (AEDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 3E97622068; Thu, 22 Nov 2018 18:36:44 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 22 Nov 2018 18:36:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= mendozajonas.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=fm1; bh=o59YH22o+gF0PjrNrkLU5zXONLahQ8g1r2AI30e58R8=; b=h9bLy JQOcDAGKh7Ghx0jFIysIQ7FdZfXC9SfjStgKOFoA1AMz2uzZa/RnY1l40GoxCRC5 171H1unZ1p+3xQKDgyqAaJyZw+yhmcLjDYE3h5IscOw+d8SLZsG/DaXmioZG3Sz1 uShhS1+p7PofMdkcjb42P7KovwbHGgMFIV9WM6K6WgRppodVkn5BDh1iPFWxfeCp mo/J7eH48HxvhfziyW21ggLSAo1UhG+sVlCnKiHWtc/fDYTcIaDWLM9oA61Iv/Is UXVIkexwqqfJ8mMaC8Q/UG/XKBtWHvaTHNh1R93UNA+wm+oXmkno6S06/PL7YcZ0 PrAtdWTDMLal1+72w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=o59YH22o+gF0PjrNrkLU5zXONLahQ8g1r2AI30e58R8=; b=yxVa9/35 qlWYoepcpC0TirJ8+DlVtqnOEyvc5oZXCEM5R2RHzbufKmOSSb2Oq1uYkKW8vKeG YWv2Yo24iZ5rCuI5ePW6Y+SxxFMllBhP1zptljO0+KBW5eiP6EQFrmK3T+704+TS wtdU8zTvurWPghrgoxx1p+XPSbN2EToTwBdmyzBIg0+SaksQmvlTc6SI0iVOfrjd A3wZSbuJsOygJC5qAtrzSji6gwDKnMlH9cEYgC48MVRQL1GXq9cqPv5lTs7XTzBh QNhJWn5Sf1hrVDtHani+DYTuGz08zL4ZiORZiOW2tHLytvblu8pbkhXrdQND42Ge k7Wej+eoQayf1w== X-ME-Sender: X-ME-Proxy: Received: from v4.ozlabs.ibm.com (unknown [122.99.82.10]) by mail.messagingengine.com (Postfix) with ESMTPA id CBAD7102DE; Thu, 22 Nov 2018 18:36:42 -0500 (EST) From: Samuel Mendoza-Jonas To: petitboot@lists.ozlabs.org Subject: [PATCH 01/13] utils/pb-console: Support agetty's autologin option Date: Fri, 23 Nov 2018 10:36:18 +1100 Message-Id: <20181122233630.6303-2-sam@mendozajonas.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181122233630.6303-1-sam@mendozajonas.com> References: <20181122233630.6303-1-sam@mendozajonas.com> MIME-Version: 1.0 X-BeenThere: petitboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Petitboot bootloader development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Samuel Mendoza-Jonas Errors-To: petitboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Petitboot" If the getty arguments include '-a' do not set the '-l' option. This implies the environment has been configured with users and will launch the subsequent pb-console instance itself. Signed-off-by: Samuel Mendoza-Jonas --- utils/pb-console | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/utils/pb-console b/utils/pb-console index 282fca11..ef9ed0f6 100644 --- a/utils/pb-console +++ b/utils/pb-console @@ -80,12 +80,24 @@ then then getty="$getty_arg" fi + + login_arg="-l$0" + for ttyarg in "$@" + do + # If the getty args include autologin don't override with -l + # and leave calling petitboot-nc to the user's init + if [ "$ttyarg" == "-a" ] + then + login_arg="" + fi + done + if [ "$detach" = 1 ] then - $getty -l $0 "$@" & + $getty $login_arg "$@" & exit else - exec $getty -l $0 "$@" + exec $getty $login_arg "$@" fi fi