On Monday 23 October 2006 22:19, Sven Luther wrote:
> This patch is currently untested, but i don't want to lose it again, so
> i submit it. I expect to test it nextly, but i can only do so for hvc
> as i have no longer access to a non-virtualized pserver, and can only
> do so within the constraints of my free time.

The patch had an error in the sed on /etc/inittab. Please test the 
attached patch, which also avoids the code duplication.

Index: finish-install.d/90console
===================================================================
--- finish-install.d/90console	(revision 42772)
+++ finish-install.d/90console	(working copy)
@@ -16,16 +16,18 @@
 console=${console#/dev/}
 
 case "$console" in
-ttyS*)
+ttyS*|hvc*|hvsi*)
 	log "Configuring /etc/inittab for serial console"
+	consoletype=${console%%[0-9]*}
+	ttyline=${console#$consoletype}
 	ttyspeed=$(chroot /target stty --file /dev/$console speed)
-	ttyline=${console#ttyS}
 	ttyterm="$TERM"
 
 	if [ -z "$ttyterm" ]; then ttyterm=vt100; fi
 	if [ -z "$ttyspeed" ]; then ttyspeed=9600; fi
+
 	sed -i -e "s/^\([1-6]\):/#\1:/" \
-	    -e "s/^#T0\(.*ttyS\).*/T$ttyline\1$ttyline $ttyspeed $ttyterm/" \
+	    -e "s/^#T0\(.*\)ttyS.*/T$ttyline\1$console $ttyspeed $ttyterm/" \
 	    /target/etc/inittab
 	echo "# serial console added by debian-installer" >> /target/etc/securetty
 	echo "$rawconsole" >> /target/etc/securetty

Attachment: pgpODHinIv2cP.pgp
Description: PGP signature

Reply via email to