Skip to content

Commit 9700860

Browse files
committed
stability fixes in runGRIDContainerized.sh
1 parent 52c6168 commit 9700860

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

GRID/utils/runGRIDContainerized.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ echo "Trying to run script ${SCRIPT} in a container environment"
99

1010
# detect architecture (ARM or X86)
1111
ARCH=$(uname -i)
12-
if [ "$ARCH" == "aarch64" ] || [ "$arch" == "x86" ]; then
12+
if [ "$ARCH" == "aarch64" ] || [ "$ARCH" == "x86_64" ]; then
1313
echo "Detected hardware architecture : $ARCH"
1414
else
1515
echo "Invalid architecture ${ARCH} detected. Exiting"
@@ -35,9 +35,9 @@ fi
3535
# copy script to WORK_DIR
3636
cp ${SCRIPT} ${WORK_DIR}/job.sh
3737

38-
# export certificates (need to be created before)
39-
ALIEN_CERTFILE=$(ls -t /tmp/tokencert_*.pem 2> /dev/null | head -n 1)
40-
ALIEN_KEYFILE=$(ls -t /tmp/tokenkey_*.pem 2> /dev/null | head -n 1)
38+
# export certificates - belonging to current user (need to be created before)
39+
ALIEN_CERTFILE=$(find /tmp -type f -name 'tokencert*pem' -user `whoami` 2> /dev/null)
40+
ALIEN_KEYFILE=$(find /tmp -type f -name 'tokenkey*pem' -user `whoami` 2> /dev/null)
4141

4242
[ "${ALIEN_CERTFILE}" == "" ] && echo "No certificate file found; Initialize a token with alien-init-token or similar" && exit 1
4343
[ "${ALIEN_KEYFILE}" == "" ] && echo "No certificate file found; Initialize a token with alien-init-token or similar" && exit 1

0 commit comments

Comments
 (0)