From 5db8950ab3502b73df459b124887fef0338fb83b Mon Sep 17 00:00:00 2001 From: ficus Date: Fri, 16 Nov 2012 22:05:53 +0100 Subject: fix and doc serial ttyS0 boot login problem --- config/includes.chroot/etc/inittab | 10 -------- .../lib/live/config/9999-serial_console | 30 ++++++++++++++++++++++ 2 files changed, 30 insertions(+), 10 deletions(-) create mode 100755 config/includes.chroot/lib/live/config/9999-serial_console (limited to 'config') diff --git a/config/includes.chroot/etc/inittab b/config/includes.chroot/etc/inittab index 483d42a..91e6d10 100644 --- a/config/includes.chroot/etc/inittab +++ b/config/includes.chroot/etc/inittab @@ -58,14 +58,4 @@ po::powerokwait:/etc/init.d/powerfail stop #5:23:respawn:/sbin/getty 38400 tty5 #6:23:respawn:/sbin/getty 38400 tty6 -# Example how to put a getty on a serial line (for a terminal) -# -#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100 -#T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100 - -# Example how to put a getty on a modem line. -# -#T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3 - -#T0:2345:respawn:/sbin/getty -L ttyS0 115200 linux T0:12345:respawn:/sbin/getty -L ttyS0 115200 vt100 diff --git a/config/includes.chroot/lib/live/config/9999-serial_console b/config/includes.chroot/lib/live/config/9999-serial_console new file mode 100755 index 0000000..8ade5da --- /dev/null +++ b/config/includes.chroot/lib/live/config/9999-serial_console @@ -0,0 +1,30 @@ +#!/bin/sh + +STATEFILE=/var/lib/live/config/serialconsole + +Serialconsole () +{ + # Checking that we haven't already run + if [ -e ${STATEFILE} ] + then + return + fi + + echo -n " serial console" + + Configure_serialconsole +} + +Configure_serialconsole () +{ + # Note unusual delimiters + # This *fixes*, but does not necessarily enable... + sed -i -e "s|\(T0:.*\?/dev/\)\(tty\)\(.*\?/dev/\)\(tty\)\(.*\)|\1\2S0\3\4S0\5|" /etc/inittab + tail /etc/inittab + init q + + # Creating state file + touch ${STATEFILE} +} + +Serialconsole -- cgit v1.2.3