aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/includes.chroot/etc/inittab10
-rwxr-xr-xconfig/includes.chroot/lib/live/config/9999-serial_console30
-rw-r--r--doc/serial-console.txt20
3 files changed, 50 insertions, 10 deletions
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
diff --git a/doc/serial-console.txt b/doc/serial-console.txt
new file mode 100644
index 0000000..a5ba6ea
--- /dev/null
+++ b/doc/serial-console.txt
@@ -0,0 +1,20 @@
+
+Recent versions of live-config have a bug relating to automatic serial console
+logins (eg, on /dev/ttyS0). These affect headless systems like torouter.
+
+Previously, a "live-getty" boot flag was sufficient to enable such logins. At
+some point this broke, and now even custom versions of /etc/inittab which
+enable regular logins get mangled by the live-config script '0170-sysvinit'.
+
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=602788
+
+http://live.debian.net/gitweb/?p=live-config.git;a=blob;f=docs/README;h=8059e3d8d2be6616d30f9e695472d4992387f7d2;hb=HEAD
+
+As a work-around, the bundled /etc/inittab and script 9999-serial_console
+combined de-mangle the 0170-sysvinit changes and enable an automatic user login
+on /dev/ttySO after system boot.
+
+See also:
+
+config/includes.chroot/etc/inittab
+config/includes.chroot/lib/live/config/9999-serial_console