summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'init.d/fixinittab')
-rw-r--r--init.d/fixinittab28
1 files changed, 19 insertions, 9 deletions
diff --git a/init.d/fixinittab b/init.d/fixinittab
index 4491217..b0fcaeb 100644
--- a/init.d/fixinittab
+++ b/init.d/fixinittab
@@ -30,6 +30,25 @@ start()
sed -i -e '/^s[01]/ s/^/#/' /etc/inittab
sed -i -e '/^b0/ s/^/#/' /etc/inittab
+ if [ -z "${LIVECD_CONSOLE}" ]
+ then
+ for c in hvc0
+ do
+ if [ -c "/dev/${c}" ]
+ then
+ LIVECD_CONSOLE_BAUD=$(stty -F "/dev/${c}" speed)
+
+ eindent
+ ebegin "Adding ${c} console to inittab ..."
+ echo "s0:12345:respawn:/sbin/agetty -a root ${LIVECD_CONSOLE_BAUD} ${c}" >> /etc/inittab
+ eend $?
+ eoutdent
+
+ break
+ fi
+ done
+ fi
+
# SPARC & HPPA console magic
if [ "${HOSTTYPE}" = "sparc" -o "${HOSTTYPE}" = "hppa" ]
then
@@ -94,15 +113,6 @@ start()
fi
fi
- if [ -c "/dev/hvc0" -a "${LIVECD_CONSOLE}" = "" ]
- then
- eindent
- ebegin "Adding hvc console to inittab ..."
- echo "s0:12345:respawn:/sbin/agetty -a root 9600 hvc0 vt320" >> /etc/inittab
- eend $?
- eoutdent
- fi
-
# EFI-based machines should automatically hook up their console lines
if dmesg | grep -q '^Adding console on'
then