#!/bin/sh if [ $# -lt 7 ] then echo "usage: $0 " \ " [ ...]" >&2 exit 1 fi GLEXEC="$1" PROXY="$2" SANDBOX="$3" shift 3 # use glexec to start a script that # - changes into the right working directory # - execs the wrapper, which will take care of the rest # SH=`readlink -f /bin/sh` GLEXEC_CLIENT_CERT="$SANDBOX.condor/$PROXY" export GLEXEC_CLIENT_CERT # prevent glexec from creating a proxy in /tmp that is not cleaned up GLEXEC_TARGET_PROXY=/dev/null export GLEXEC_TARGET_PROXY exec "$GLEXEC" "$SH" -c "cd \"$SANDBOX\" && exec \"\$@\"" cd-and-exec "$@"