#!/bin/ksh
#
# Create a script that will be executed on The destination node to do a long 
# listing of all files requested and mail it to the user that requested it
#
# Called from:  net_xfer.
#
# Parameters:   $1 - username of who is running transfer script
#			 $2 - file (or list of files) to verify
#
# On Destination system, invoke $VERIFY_SCRIPT and pipe output to mail to
# user.
# Remember net_xfer -now needs to clean out the $VERIFY_SCRIPT
#

VERIFY_SCRIPT=/auto/rnet/admin/xfer_verify.$USER

if [ ! -f $VERIFY_SCRIPT ]; then

	echo "#!/bin/sh" > $VERIFY_SCRIPT

fi

case $1 in
	-f) 
#
# Just a simple filename
#
        echo "/usr/bin/ls -ld $2"  >> $VERIFY_SCRIPT

		;;
	-l)

#
#Have a list of file names
#
	  for i in `cat $2`
	  do
	  	echo "/usr/bin/ls -ld  $i " >> VERIFY_SCRIPT 
	  done
		;;
esac


