/usr/bin/sudo -k
if [ "$?" != 0 ]; then 
	echo
	echo "         Sudo key NOT dropped\!"
	echo
	sleep 20
fi

#------------------------------------------------------------------------------
# When leaving the console clear the screen to increase privacy.
# Also clears the scroll-back buffer.
# Borrowed heavily from http://www.hermann-uwe.de/files/bash_logout
#------------------------------------------------------------------------------

case "$(tty)" in
  /dev/tty[0-9])
  	# establish two different VTs
    t=$(v=`tty` ; echo ${v##*ty})
	if [ "$t" = "1" ]; then
		tmp=3
	else
		tmp=1
	fi

	# this clears the screen and scrollback buffer
    clear
    chvt "${tmp}"; chvt "$t"
  ;;

  *)
  	# we're on a vty, so there's nothing to clear
  ;;

esac

