From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 3BCB6138334 for ; Fri, 20 Sep 2019 19:32:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 84F83E08AA; Fri, 20 Sep 2019 19:32:55 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 6C879E08AA for ; Fri, 20 Sep 2019 19:32:55 +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 DD59B34B433 for ; Fri, 20 Sep 2019 19:32:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 66B0E4D3 for ; Fri, 20 Sep 2019 19:32:50 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1568913577.3c23b30aed805fb5f6b148f273c0c139eac8f6f3.mattst88@gentoo> Subject: [gentoo-commits] proj/livecd-tools:master commit in: init.d/ X-VCS-Repository: proj/livecd-tools X-VCS-Files: init.d/fixinittab X-VCS-Directories: init.d/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: 3c23b30aed805fb5f6b148f273c0c139eac8f6f3 X-VCS-Branch: master Date: Fri, 20 Sep 2019 19:32:50 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c1a406cd-9c22-4ca2-8e71-c434703f71f0 X-Archives-Hash: 7d6cdfb0ab1ab231f7d88ec2b7dcbdd2 commit: 3c23b30aed805fb5f6b148f273c0c139eac8f6f3 Author: Matt Turner gentoo org> AuthorDate: Thu Sep 19 17:18:18 2019 +0000 Commit: Matt Turner gentoo org> CommitDate: Thu Sep 19 17:19:37 2019 +0000 URL: https://gitweb.gentoo.org/proj/livecd-tools.git/commit/?id=3c23b30a fixinittab: Refactor HW-specific serial console support Signed-off-by: Matt Turner gentoo.org> init.d/fixinittab | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/init.d/fixinittab b/init.d/fixinittab index 4491217..b0fcaeb 100644 --- a/init.d/fixinittab +++ b/init.d/fixinittab @@ -30,6 +30,25 @@ start() sed -i -e '/^s[01]/ s/^/#/' /etc/inittab sed -i -e '/^b0/ s/^/#/' /etc/inittab + if [ -z "${LIVECD_CONSOLE}" ] + then + for c in hvc0 + do + if [ -c "/dev/${c}" ] + then + LIVECD_CONSOLE_BAUD=$(stty -F "/dev/${c}" speed) + + eindent + ebegin "Adding ${c} console to inittab ..." + echo "s0:12345:respawn:/sbin/agetty -a root ${LIVECD_CONSOLE_BAUD} ${c}" >> /etc/inittab + eend $? + eoutdent + + break + fi + done + fi + # SPARC & HPPA console magic if [ "${HOSTTYPE}" = "sparc" -o "${HOSTTYPE}" = "hppa" ] then @@ -94,15 +113,6 @@ start() fi fi - if [ -c "/dev/hvc0" -a "${LIVECD_CONSOLE}" = "" ] - then - eindent - ebegin "Adding hvc console to inittab ..." - echo "s0:12345:respawn:/sbin/agetty -a root 9600 hvc0 vt320" >> /etc/inittab - eend $? - eoutdent - fi - # EFI-based machines should automatically hook up their console lines if dmesg | grep -q '^Adding console on' then