#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

/usr/games/xbubble

echo  "in rc.local"
if test -e /usr/bin/truecrypt ; then
   echo "run in error ..."
   truecrypt -t -k "" /dev/sda6 /media/truecrypt1
#   truecrypt -t /dev/sda6 /media/truecrypt1 > /dev/null
##   truecrypt -t [-k ""] -p "password" --non-interactive /dev/sda6 /media/truecrypt1
   if $? -ne 0 ; then
      echo "some error happened: exit §0"
      exit 1
   fi
   echo "finished well"
   exit 0
else
   echo "missing /usr/bin/truecrypt"
   exit 1
fi

exit 0
