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)) _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit