Skip to content

Commit c12f491

Browse files
committed
fix the check for a kerberos token
1 parent 7ec13f5 commit c12f491

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

scripts/makepeds_psana2

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,6 @@ do
254254
done
255255
set -- "${POSITIONAL[@]}"
256256

257-
#check for a valid kerberos token, otherwise the deploy step will not work!
258-
if [ $(klist | wc -l) -eq 0 ]; then
259-
exit 4
260-
fi
261-
262257
T="$(date +%s%N)"
263258
echo "XXXXXXXXXXXXXXXXX START MAKEPEDS at $(date +'%T') on $HOSTNAME XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
264259

@@ -278,6 +273,14 @@ MYADUMIN=${MYADUMIN:=-1}
278273
MYADUMAX=${MYADUMAX:=-1}
279274
#one setting to run each process on an own server (currently faster) or not (if we had to use reservations)
280275

276+
#check for a valid kerberos token, otherwise the deploy step will not work!
277+
if ! klist -s ; then
278+
echo No valid kerberos token, deployment will not work
279+
if [ $DEPLOY == 1 ]; then
280+
exit 4
281+
fi
282+
fi
283+
281284
if [ "$RUN" == 0 ]; then
282285
printf "Please enter a run number HERE: \n"; read -r RUN
283286
fi

0 commit comments

Comments
 (0)