#!/bin/ash
#
#
 if [ x$1 = xinit ]; then
   if [ -e /var/log/uvesa.log ]; then
     sed -i /uvesa/d /etc/init.d/autostart.sh
     echo "uvesa set $(cat /var/log/uvesa.log)" >> /etc/init.d/autostart.sh
     if [ -e /usr/bin/startx ]; then
       sed -i s/GPU=yes/GPU=no /etc/gpu/gpu.config
     fi
     rm /var/log/uvesa.log
   fi
 fi
 if [ x$1 = xset ]; then
   modprobe uvesafb mode_option=$2
 fi
 if [ x$1 = x ]; then
   delfb 1>/dev/null
   echo 1024x768 > /var/log/uvesa.log
   echo "UVESA boot enabled."
 fi
