Sophie

Sophie

distrib > Mandriva > 9.0 > i586 > media > contrib-src > by-pkgid > c4365b2959a3ffde0f6450a617df341a > files > 8

OpenPBS-2.3.16-34mdk.src.rpm

#!/bin/sh
# epilogue arguments
# Script is run under uid of root
# argv[1] is the jobid
# argv[2] is the user's name
# argv[3] is the user's group name
# argv[4] is the job name
# argv[5] is the session id
# argv[6] is the list of resource limits specified
# argv[7] is the list of resources used
# argv[8] is the queue in which the job resides
# argv[9] is the Account under which the job run
jobid=${1}
user=${2}
group=${3}
jobname=${4}
sessionid=${5}

if [ -d /var/spool/pbs/spool/${user}_${jobid} ]; then
	cd /var/spool/pbs/spool/${user}_${jobid}
	rm -rf /var/spool/pbs/spool/${user}_${jobid}/*
	else	
	echo "error.." > /tmp/error-epilogue-${1}
fi

if [ -d /var/spool/pbs/spool/${user}_${jobid} ]; then
	/bin/rmdir /var/spool/pbs/spool/${user}_${jobid}
	else
	echo "error.." > /tmp/error-epilogue-${1}
fi

exit 0