Bug#442289: 25configure_init Mangles ttyS Lines in /etc/inittab
- Subject: Bug#442289: 25configure_init Mangles ttyS Lines in /etc/inittab
- From: debian-bugs at ssorensen.fastmail.fm (Svend Sorensen)
- Date: Fri, 14 Sep 2007 11:34:33 -0700
- Message-id: <[🔎] 20070914183432.GH3320@hscphiad>
Package: live-initramfs
Version: 2.3.6.ds1-13
The 25configure_ini file
(/usr/share/initramfs-tools/scripts/casper-bottom/25configure_init)
mangles the ttyS[0-9] lines in /etc/inittab. This is due to the sed
expression on line 54:
sed -i -e "s|^\([^:]*:[^:]*:[^:]*\):.*getty.*\<\(tty[0-9]*\).*$|\1:/bin/login -f $USERNAME </dev/\2 >/dev/\2 2>\&1|" /root/etc/inittab
The regex "tty[0-9]*" matches ttyS0, but only saves the string tty.
This results in lines which contain /dev/tty on boot. If the serial
console line is uncommented in the original /etc/inittab, the system
fails to open the serial console on boot due to /dev/tty not existing.
This could be fixed by:
1. Changing the regex so that ttyS* lines are not matched:
"tty[0-9][0-9]*"
2. or saving the entire ttyS* filename:
"ttyS\?[0-9]*"
(This regex contains "\?" which is a GNU extension to sed.)
$ uname -a
Linux agate.ciffer.net 2.6.9-023stab041.3-smp #1 SMP Wed Feb 14 13:13:03 MSK 2007 i686 GNU/Linux
$ dpkg -s libc6 | grep ^Version
Version: 2.3.6.ds1-13
Reply to: