[PATCH 92/94] use/tty: enable grub console support
Konstantin A. Lepikhov
lakostis at altlinux.ru
Sat Dec 4 16:51:57 MSK 2021
- Even if we enable console/tty support in kernel, grub should be aware
too.
---
features.in/tty/rootfs/image-scripts.d/50-serial | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/features.in/tty/rootfs/image-scripts.d/50-serial b/features.in/tty/rootfs/image-scripts.d/50-serial
index 411fbc18..320f93b6 100755
--- a/features.in/tty/rootfs/image-scripts.d/50-serial
+++ b/features.in/tty/rootfs/image-scripts.d/50-serial
@@ -4,6 +4,7 @@
BIN=/sbin/agetty
CFG=/etc/inittab
SEC=/etc/securetty
+GRUB=/etc/default/grub
[ -n "$GLOBAL_TTY_DEV" -a -n "$GLOBAL_TTY_RATE" ] || exit 0
[ -s "$CFG" -a -x "$BIN" ] || exit 0
@@ -16,3 +17,8 @@ if ! grep -q "$BIN" "$CFG"; then
n=$(($n+1))
done
fi
+
+if [ -s "$GRUB" ]; then
+ echo 'GRUB_TERMINAL="serial console"' >> "$GRUB"
+ echo "GRUB_SERIAL_COMMAND=\"serial --speed=$GLOBAL_TTY_RATE --unit=0 --word=8 --parity=no --stop=1\"" >> "$GRUB"
+fi
--
2.33.0
--7tTYFaB8YS/sedyD--
More information about the devel-distro
mailing list