diff options
Diffstat (limited to 'config/includes.chroot/lib/live')
-rwxr-xr-x | config/includes.chroot/lib/live/config/9999-serial_console | 30 |
1 files changed, 30 insertions, 0 deletions
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 |