FS#4316 - Status messages malformed when using serial console

Attached to Project: Arch Linux
Opened by Carl Chave (sodface) - Wednesday, 29 March 2006, 18:24 GMT
Last edited by Dan McGee (toofishes) - Wednesday, 12 September 2007, 15:39 GMT
Task Type Bug Report
Category System
Status Closed
Assigned To Tobias Powalowski (tpowa)
Thomas Bächler (brain0)
Dan McGee (toofishes)
Architecture All
Severity Low
Priority Normal
Reported Version 0.7.1 Noodle
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The output of the "stty size" command in /etc/rc.d/functions returns "0 0" when using a serial console, resulting in a bad value for $STAT_COL and subsequently deltext().

Changing the code to the following produces satisfactory output for my setup:
STAT_COL=$(stty size)
STAT_COL=${STAT_COL##* }
if [ "$STAT_COL" = "0" ]; then
STAT_COL=80
fi
STAT_COL=$[ $STAT_COL - 13 ]

Above suggested code borrowed from:
http://wiki.linuxfromscratch.org/lfs/ticket/325
This task depends upon

Closed by  Dan McGee (toofishes)
Wednesday, 12 September 2007, 15:39 GMT
Reason for closing:  Fixed
Additional comments about closing:  fixed in new initscripts release
Comment by Carl Chave (sodface) - Sunday, 02 April 2006, 00:34 GMT
Using tset -Q once should fix the stty size call and adjust for different terminal sizes I think.

STAT_COL=$(stty size)
STAT_COL=${STAT_COL##* }
if [ "$STAT_COL" = "0" ]; then
tset -Q
STAT_COL=$(stty size)
STAT_COL=${STAT_COL##* }
fi
STAT_COL=$[ $STAT_COL - 13 ]
Comment by Tobias Powalowski (tpowa) - Sunday, 24 June 2007, 09:37 GMT
dan an other one you could look at?
Comment by Dan McGee (toofishes) - Tuesday, 26 June 2007, 20:57 GMT
Sure, I'll look into it.
Comment by Dan McGee (toofishes) - Wednesday, 15 August 2007, 04:06 GMT
See
http://archlinux.org/pipermail/arch-dev-public/2007-August/001436.html
for a hopeful fix. Suggestions here were incorporated, please give me feedback by trying out the package in testing.

Loading...