From 3c45f0b8149f2970d65069cd5ea96d15aa8f0356 Mon Sep 17 00:00:00 2001 From: ficus Date: Mon, 19 Nov 2012 17:49:19 +0100 Subject: roll back to recommended inittab/serial setup --- .../lib/live/config/018-serial_console | 28 ++++++++++++++++++++ .../lib/live/config/9999-serial_console | 30 ---------------------- 2 files changed, 28 insertions(+), 30 deletions(-) create mode 100755 config/includes.chroot/lib/live/config/018-serial_console delete mode 100755 config/includes.chroot/lib/live/config/9999-serial_console (limited to 'config/includes.chroot/lib') diff --git a/config/includes.chroot/lib/live/config/018-serial_console b/config/includes.chroot/lib/live/config/018-serial_console new file mode 100755 index 0000000..745b0b0 --- /dev/null +++ b/config/includes.chroot/lib/live/config/018-serial_console @@ -0,0 +1,28 @@ +#!/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 + sed -i -e "s|#\(T0:.*\?/dev/\)\(tty\)\(.*\?/dev/\)\(tty\)\(.*\)|\1\2S0\3\4S0\5|" /etc/inittab + init q + + # Creating state file + touch ${STATEFILE} +} + +Serialconsole diff --git a/config/includes.chroot/lib/live/config/9999-serial_console b/config/includes.chroot/lib/live/config/9999-serial_console deleted file mode 100755 index 8ade5da..0000000 --- a/config/includes.chroot/lib/live/config/9999-serial_console +++ /dev/null @@ -1,30 +0,0 @@ -#!/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