This is how prebaseconfig works out whether it's running on a serial console:
# Since this script is running with debconf, 'tty' does
# not give reliable answers about what sort of terminal
# we have. The stdin of /sbin/debian-installer seems
# to tell the truth.
inst_pid=$(pidof debian-installer | cut -d" " -f1)
rawconsole=$(readlink /proc/${inst_pid}/fd/0)
console=$(mapdevfs "$rawconsole")
rawconsole=${rawconsole#/dev/}
console=${console#/dev/}
This is how prebaseconfig works out whether it's running on a serial console:
# Since this script is running with debconf, 'tty' does installer seems $(readlink /proc/$ {inst_pid} /fd/0) ${rawconsole# /dev/} ${console# /dev/}
# not give reliable answers about what sort of terminal
# we have. The stdin of /sbin/debian-
# to tell the truth.
inst_pid=$(pidof debian-installer | cut -d" " -f1)
rawconsole=
console=$(mapdevfs "$rawconsole")
rawconsole=
console=
case "$console" in
ttyS*)
Do you have any ideas on how to improve this?