Index: finish-install/debian/changelog
===================================================================
--- finish-install/debian/changelog (revision 50280)
+++ finish-install/debian/changelog (working copy)
@@ -1,3 +1,10 @@
+finish-install (2.13sci1) UNRELEASED; urgency=low
+
+ * 90console: Use serial-console-info tool if /proc console
+ detection is being stubborn.
+
+ -- dann frazier Thu, 29 Nov 2007 14:32:24 -0700
+
finish-install (2.13) unstable; urgency=low
* 90console: avoid duplication of values on /etc/securetty.
Index: finish-install/finish-install.d/90console
===================================================================
--- finish-install/finish-install.d/90console (revision 50280)
+++ finish-install/finish-install.d/90console (working copy)
@@ -21,6 +21,17 @@
# to tell the truth.
inst_pid=$(pidof debian-installer | sed "s/ /\n/g" | sort -n | head -n 1)
rawconsole=$(readlink /proc/${inst_pid}/fd/0)
+# The proc trick doesn't always work
+# For example, when ia64 detects EFI console settings, /proc only exposes
+# /dev/console
+if [ "$rawconsole" == "/dev/console" ] && \
+ [ -x /bin/serial-console-info ] && \
+ /bin/serial-console-info > /tmp/serial-console-info.out; then
+ sci_port=$(grep ^DEV= /tmp/serial-console-info.out | cut -d= -f2)
+ sci_baud=$(grep ^SPEED= /tmp/serial-console-info.out | cut -d= -f2)
+ rawconsole="/dev/$sci_port"
+fi
+rm -f /tmp/serial-console-info.out
console=$(mapdevfs "$rawconsole")
rawconsole=${rawconsole#/dev/}
console=${console#/dev/}
@@ -32,7 +43,11 @@
log "Configuring init for serial console"
consoletype=${console%%[0-9]*}
ttyline=${console#$consoletype}
- ttyspeed=$(chroot /target stty --file /dev/$console speed)
+ if [ -n "$sci_baud" ]; then
+ ttyspeed="$sci_baud"
+ else
+ ttyspeed=$(chroot /target stty --file /dev/$console speed)
+ fi
ttyterm="$TERM"
if [ -z "$ttyterm" ]; then ttyterm=vt100; fi
|