SVN: rc-scripts/trunk/rc.d/init.d/functions
arekm
arekm at pld-linux.org
Thu Jul 16 19:07:33 CEST 2009
Author: arekm
Date: Thu Jul 16 19:07:32 2009
New Revision: 10419
Modified:
rc-scripts/trunk/rc.d/init.d/functions
Log:
On IPMI serial console COLUMNS ends up with negative value like -13. Protect agains such thing. Also protect LINES.
Modified: rc-scripts/trunk/rc.d/init.d/functions
==============================================================================
--- rc-scripts/trunk/rc.d/init.d/functions (original)
+++ rc-scripts/trunk/rc.d/init.d/functions Thu Jul 16 19:07:32 2009
@@ -25,7 +25,8 @@
_setterm
unset _setterm
fi
-[ -z "$COLUMNS" ] && COLUMNS=80
+[ -z "$LINES" -o "$LINES" -le 0 ] && COLUMNS=40
+[ -z "$COLUMNS" -o "$COLUMNS" -le 0 ] && COLUMNS=80
export LINES COLUMNS
INIT_COL=$((COLUMNS - 13))
More information about the pld-cvs-commit
mailing list