mirror of
https://github.com/vyos/vyos-build.git
synced 2025-10-01 20:28:40 +02:00
Set the serial console speed to 115200 in all build scripts, as is the standard for current boards. This avoids an annoyance for users of the livecd, and makes the defaults in build scripts in tools/ and scripts/ consistent.
35 lines
870 B
Bash
Executable File
35 lines
870 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ -r etc/event.d/tty1 ] ; then
|
|
echo I: Delay getty until rcX completes
|
|
sed -i 's/start on runlevel /start on stopped rc/' \
|
|
etc/event.d/tty[1-6]
|
|
if [ ! -r etc/event.d/ttyS0 ] && [ -c dev/ttyS0 ] ; then
|
|
echo I: Enable serial console login
|
|
cat <<-EOF > etc/event.d/ttyS0
|
|
# ttyS0 - getty
|
|
#
|
|
# This service maintains a getty on ttyS0 from the point the system is
|
|
# started until it is shut down again.
|
|
|
|
start on stopped rc2
|
|
start on stopped rc3
|
|
start on stopped rc4
|
|
start on stopped rc5
|
|
|
|
stop on runlevel 0
|
|
stop on runlevel 1
|
|
stop on runlevel 6
|
|
|
|
respawn
|
|
exec /sbin/getty 115200 ttyS0 vt100
|
|
|
|
EOF
|
|
fi
|
|
fi
|
|
|
|
if [ -r etc/inittab ] && [ -c dev/ttyS0 ] && grep -q '^#T0:.*getty.*ttyS0' etc/inittab ; then
|
|
echo I: Enable serial console login
|
|
sed -i '/^#T0:/s|^#.*$|T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100|' etc/inittab
|
|
fi
|