#!/bin/sh
#
# launch freevo
#
# runlevels: geexbox, debug

# do not run if Freevo is NOT present
if test ! -x /usr/bin/freevo; then
  exit 0
fi

echo "### Starting Freevo ###"

# disable console blanking and cursor blinking
echo -e "\033[9;0]\033[?25l"

# disable kernel messages
echo 0 > /proc/sys/kernel/printk

# tty used for the video display and commands input
TTY=4

# disable fbdev cursor
echo -e "\033[?1;;c" >/dev/tty$TTY

chvt $TTY
(
  freevo
) </dev/tty$TTY
chvt 1

exit 0
