#!/bin/sh
### BEGIN INIT INFO
# Provides:          fa-set-7in-rows
# Required-Start:    $local_fs $remote_fs $console-screen
# Required-Stop:     $local_fs $remote_fs
# Default-Start:     S 2 3 4 5
# Default-Stop:      0 1 6
# Description:       This script ensures that all the lines are visible on the 6100's 7-in screen after we've booted the system.
# Short-Description:	Readjust console rows for 6100
### END INIT INFO


# Author: Andrew Dorney <adorney@forceamerica.com>
# Project: P1131 - 6100 Spreader Control
# Created 12/03/2008
# Modified 12/05/2008
# Modified 01/20/2009 By Andrew Dorney
#		- Change the fb test to include video= as well.
# Modified 02/25/2010 By Andrew Dorney
#       - Remove the test cases since "we control the horizontal and the vertical", as well as GRUB's menu.lst.
#       - Fix tabbing issues, add some comments.

PATH=/sbin:/bin:/usr/sbin:/usr/bin
STTY="/bin/stty"
FGCONSOLE="/bin/fgconsole"
STTY_OPTS="rows 30"
DEVICE_PREFIX="/dev/tty"

setup()
{
    stty -F /dev/tty2 rows 30 &
    stty -F /dev/tty3 rows 30 &
    stty -F /dev/tty4 rows 30 &
    stty -F /dev/tty5 rows 30 &
    stty -F /dev/tty6 rows 30 &
    stty -F /dev/tty7 rows 30 &
}

case "$1" in
    start|reload|restart|force-reload)
        echo "Readjusting console rows for the 6100"
        setup
    ;;
    stop)
    ;;
    *)
        setup
    ;;
esac
