#!/bin/sh
#
# Script that is run automagically by /etc/ttys when an IntelliStar starts up.

# Setup our file descriptors.
exec < /dev/$1 > /dev/$1 2>&1

if kenv | grep -q no_render ; then
    sleep 3600
elif [ -r /tmp/no_render ]; then
    sleep 3600
else
    rm -rf /dev/dri/card0
    su -l dgadmin startx
fi
