From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1261040-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BAD7913835A for <garchives@archives.gentoo.org>; Sun, 14 Mar 2021 20:05:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D6BFEE0828; Sun, 14 Mar 2021 20:05:58 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BCBE9E0828 for <gentoo-commits@lists.gentoo.org>; Sun, 14 Mar 2021 20:05:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CBA36335D51 for <gentoo-commits@lists.gentoo.org>; Sun, 14 Mar 2021 20:05:57 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 36AB859D for <gentoo-commits@lists.gentoo.org>; Sun, 14 Mar 2021 20:05:56 +0000 (UTC) From: "Thomas Deutschmann" <whissi@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" <whissi@gentoo.org> Message-ID: <1615750420.8544f0b7a0b574fc982d971347b7b2b06dd91a09.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: defaults/ X-VCS-Repository: proj/genkernel X-VCS-Files: defaults/initrd.scripts X-VCS-Directories: defaults/ X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 8544f0b7a0b574fc982d971347b7b2b06dd91a09 X-VCS-Branch: master Date: Sun, 14 Mar 2021 20:05:56 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e8d17b18-e43d-44da-9696-fd7127ce9199 X-Archives-Hash: 8373dc028808da9be9e23a90a43178e8 commit: 8544f0b7a0b574fc982d971347b7b2b06dd91a09 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> AuthorDate: Sat Mar 13 17:10:45 2021 +0000 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> CommitDate: Sun Mar 14 19:33:40 2021 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=8544f0b7 initrd.scripts: run_shell(): Reformat exec code Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> defaults/initrd.scripts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index b64a2c4..c133282 100644 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -1035,7 +1035,7 @@ run_shell() { && [ -c "${CONSOLE}" ] then log_msg "Opening rescue shell on ${CONSOLE} ..." - setsid ${SH} -c "exec sh --login <${CONSOLE} >${CONSOLE} 2>&1" + setsid ${SH} -c "exec sh --login 0<>${CONSOLE} 1<>${CONSOLE} 2<>${CONSOLE}" elif command -v cttyhack 1>/dev/null 2>&1 then log_msg "Opening rescue shell using cttyhack ..." @@ -1043,7 +1043,7 @@ run_shell() { elif [ -c '/dev/tty1' ] then log_msg "Opening rescue shell on /dev/tty1 fallback ..." - setsid ${SH} -c 'exec sh --login </dev/tty1 >/dev/tty1 2>&1' + setsid ${SH} -c "exec sh --login 0<>/dev/tty1 1<>/dev/tty1 2<>/dev/tty1" else log_msg "Opening rescue shell (last resort) ..." ${SH} --login @@ -1055,7 +1055,7 @@ run_shell() { # We maybe have called exec and dettached from main script; We # must restore control... - exec >${CONSOLE} <${CONSOLE} 2>&1 + exec 0<>${CONSOLE} 1<>${CONSOLE} 2<>${CONSOLE} } fs_type_in_use() {