Commit 2eee50f1 authored by Vladimír Štill's avatar Vladimír Štill

debootstrap: Make serial port dependent on computer

parent a6bc5aa7
set -ex
SERIAL_SPEED=9600
grep -q pontos /etc/hostname && SERIAL_SPEED=115200
SERIAL_DEV=ttyS1
if grep -q pontos /etc/hostname; then
SERIAL_SPEED=115200
SERIAL_DEV=ttyS0
fi
export LANG=C.UTF-8
......@@ -52,7 +56,7 @@ else
apt install -yy grub-pc
fi
if ! grep -q 'console serial' /etc/default/grub; then
sed -i /etc/default/grub -e "s/GRUB_CMDLINE_LINUX_DEFAULT=\"quiet\"/GRUB_CMDLINE_LINUX_DEFAULT=\"quiet console=tty0 console=ttyS0,$SERIAL_SPEED console=ttyS1,$SERIAL_SPEED\"/"
sed -i /etc/default/grub -e "s/GRUB_CMDLINE_LINUX_DEFAULT=\"quiet\"/GRUB_CMDLINE_LINUX_DEFAULT=\"quiet console=tty0 console=${SERIAL_DEV},$SERIAL_SPEED\"/"
cat >> /etc/default/grub <<EOF
# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos lvm"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment