#! /bin/sh
#
# /etc/rc.d/rc.text VLocitylinux bootsplash text script
# written By Uelsk8s for VLocitylinux
cat /proc/splash 2>/dev/null | grep -q silent
if [ $? != 1 ]; then
 if [ "$(fbresolution 2>/dev/null)" == "1024x768" ]; then
  x1=600
  x2=200
  y=730
  S=30
 elif [ "$(fbresolution 2>/dev/null)" == "800x600" ]; then
  x1=500
  x2=150
  y=500
  S=20
 elif [ "$(fbresolution 2>/dev/null)" == "1280x1024" ]; then
  x1=800
  x2=250
  y=950
  S=30
 else
  x1=420
  x2=100
  y=100
  S=20
 fi


  case "$1" in
   success)
         /sbin/fbtruetype -t 7CFC00 -s $S -x $x1 -y $y "$2" 2>/dev/null

        ;;
  failure)
        /sbin/fbtruetype -t EE0000 -s $S -x $x1 -y $y "$2"  2>/dev/null
        sleep 2
        ;;
 
      *)
       sleep .1
       cat /proc/splash 2>/dev/null | grep -q silent
       if [ $? != 1 ]; then
         if [ -f /etc/bootsplash/themes/current/config/bootsplash-$(fbresolution 2>/dev/null).$1 ];then
           /sbin/splash -s -u 0 /etc/bootsplash/themes/current/config/bootsplash-$(fbresolution 2>/dev/null).$1 2>/dev/null
         else
           /sbin/splash -s -u 0 /etc/bootsplash/themes/current/config/bootsplash-$(fbresolution 2>/dev/null).cfg 2>/dev/null
         fi
         /sbin/fbtruetype -t ffffff -s $S -x $x2 -y $y "$2" 2>/dev/null
       fi  
       ;;
  esac 
fi
