From 97008600b2735504012173a1983adc76ceaa81ed Mon Sep 17 00:00:00 2001 From: Sandro Wenzel Date: Wed, 6 Mar 2024 14:10:57 +0100 Subject: [PATCH] stability fixes in runGRIDContainerized.sh --- GRID/utils/runGRIDContainerized.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/GRID/utils/runGRIDContainerized.sh b/GRID/utils/runGRIDContainerized.sh index 1752f692d..cb57a7a1c 100755 --- a/GRID/utils/runGRIDContainerized.sh +++ b/GRID/utils/runGRIDContainerized.sh @@ -9,7 +9,7 @@ echo "Trying to run script ${SCRIPT} in a container environment" # detect architecture (ARM or X86) ARCH=$(uname -i) -if [ "$ARCH" == "aarch64" ] || [ "$arch" == "x86" ]; then +if [ "$ARCH" == "aarch64" ] || [ "$ARCH" == "x86_64" ]; then echo "Detected hardware architecture : $ARCH" else echo "Invalid architecture ${ARCH} detected. Exiting" @@ -35,9 +35,9 @@ fi # copy script to WORK_DIR cp ${SCRIPT} ${WORK_DIR}/job.sh -# export certificates (need to be created before) -ALIEN_CERTFILE=$(ls -t /tmp/tokencert_*.pem 2> /dev/null | head -n 1) -ALIEN_KEYFILE=$(ls -t /tmp/tokenkey_*.pem 2> /dev/null | head -n 1) +# export certificates - belonging to current user (need to be created before) +ALIEN_CERTFILE=$(find /tmp -type f -name 'tokencert*pem' -user `whoami` 2> /dev/null) +ALIEN_KEYFILE=$(find /tmp -type f -name 'tokenkey*pem' -user `whoami` 2> /dev/null) [ "${ALIEN_CERTFILE}" == "" ] && echo "No certificate file found; Initialize a token with alien-init-token or similar" && exit 1 [ "${ALIEN_KEYFILE}" == "" ] && echo "No certificate file found; Initialize a token with alien-init-token or similar" && exit 1