#!/bin/sh

# sample .efingerd file of user holik

echo
echo `date` from $1\@$2 >> /home/holik/.fingerlog # .fingerlog has to be 
						  # writeable by user nobody


if [ $1 = 'vanya' ]; then
  echo 'Pistike, tunj el !'
  exit 0
fi

if [ $1 = 'eva' ]; then
  echo 'Szia kedves!'
fi


if [ $1 = '(null)' ]; then
  echo Hello $2,
else 
  echo Hello $1\@$2,
fi


if [ "`/usr/bin/who | /bin/grep holik`" = "" ]; then
 echo 'Bad luck! I am not logged in!'
else
 echo "You are lucky! I am logged in just now (`/bin/date`)"

# this line will tell the user he has just been fingered...
# you should have xtell installed, obviously
 xtell holik "You have been fingered from $1@$2"

fi
echo
