Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/livecd-tools:master commit in: init.d/
Date: Thu, 29 Jul 2021 04:05:52
Message-Id: 1627531467.8907313e7ca1d065b9d49a29afeade02ea8a49b8.gyakovlev@gentoo
1 commit: 8907313e7ca1d065b9d49a29afeade02ea8a49b8
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 29 03:57:28 2021 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 29 04:04:27 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/livecd-tools.git/commit/?id=8907313e
7
8 init.d/fixinittab: auto-enable arm64 ttyAMA0 console
9
10 our sysvinit package adds the following line in /etc/inittab on arm64:
11
12 f0:12345:respawn:/sbin/agetty 9600 ttyAMA0 vt100
13
14 adjust fixinittab to comment out that entry, and automatically
15 configure console on ttyAMA0 with proper baud rate returned by stty.
16
17 if the line is left uncommented init will spawn a reular login on that
18 console, that may conflict with console= option user passed.
19
20 if the user passes console=***, automatic configuration is omitted.
21
22 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
23
24 init.d/fixinittab | 3 ++-
25 1 file changed, 2 insertions(+), 1 deletion(-)
26
27 diff --git a/init.d/fixinittab b/init.d/fixinittab
28 index 5c893cd..2b43021 100644
29 --- a/init.d/fixinittab
30 +++ b/init.d/fixinittab
31 @@ -23,10 +23,11 @@ start()
32 sed -i -e '/^c[0-9]/ s/^/#/' /etc/inittab
33 sed -i -e '/^s[01]/ s/^/#/' /etc/inittab
34 sed -i -e '/^b0/ s/^/#/' /etc/inittab
35 + sed -i -e '/^f0/ s/^/#/' /etc/inittab
36
37 if [ -z "${LIVECD_CONSOLE}" ]
38 then
39 - for c in hvc0 ttyHV0
40 + for c in hvc0 ttyHV0 ttyAMA0
41 do
42 if [ -c "/dev/${c}" ]
43 then