#!/bin/sh
#
# setup the tvout
#
# runlevels: geexbox, debug, install


test -f /etc/tvout || exit 1

echo "### Setting up TV-Out ###"

. /etc/tvout

atitvout $TVOUT_STANDARD auto >/dev/null 2>&1
test "`atitvout active 2>/dev/null | sed -n 's/TV.*/TV/p'`" = "TV" && echo "" > /var/tvout

# There is no possibility of tv cable autodetection with nvtv so
# tvout is not enabled automatically. Uncomment the following lines
# to have nvtv tvout enabled at boot.
#nvtv $NVTV_ON >/dev/null 2>&1
#echo "" > /var/tvout

# The same applies to S3 cards for which you need to uncomment
# the following lines.
#s3switch -q tv $TVOUT_STANDARD >/dev/null 2>&1
#echo "" > /var/tvout

exit 0
