aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorficus <ficus@robocracy.org>2012-11-16 22:05:53 +0100
committerficus <ficus@robocracy.org>2012-11-16 22:05:53 +0100
commit5db8950ab3502b73df459b124887fef0338fb83b (patch)
treeb84cbf1c86e5ade90a84294e4b4135e1fd310f59 /config
parenteddf79ba816ed061c6e2e70558f9a62c9191467c (diff)
downloadtorouter-live-5db8950ab3502b73df459b124887fef0338fb83b.tar.gz
torouter-live-5db8950ab3502b73df459b124887fef0338fb83b.zip
fix and doc serial ttyS0 boot login problem
Diffstat (limited to 'config')
-rw-r--r--config/includes.chroot/etc/inittab10
-rwxr-xr-xconfig/includes.chroot/lib/live/config/9999-serial_console30
2 files changed, 30 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