1 |
janjust |
2553 |
#!/bin/bash |
2 |
|
|
# WLCG Worker Node Environment |
3 |
|
|
# PBS Epilogue script: clean up the $JOBFEATURES file` |
4 |
|
|
# |
5 |
|
|
# Config settings for the wlcg-wn-env scripts |
6 |
|
|
# |
7 |
|
|
# Copyright (c) 2012 by |
8 |
|
|
# Jan Just Keijser (janjust@nikhef.nl) |
9 |
|
|
# Nikhef |
10 |
|
|
# Amsterdam |
11 |
|
|
# The Netherlands |
12 |
|
|
|
13 |
|
|
# a PBS user epilogue script is called with up to 7 parameters, out of which we |
14 |
|
|
# are only interesed in $1: |
15 |
|
|
# $1 = jobid |
16 |
|
|
|
17 |
|
|
# overrule any environment variable setting with the parameter supplied to the script |
18 |
|
|
PBS_JOBID=$1 |
19 |
|
|
|
20 |
|
|
# Get the configuration setting from the /etc/wlcg-wn-env.conf file |
21 |
|
|
eval "JOBFEATURES=`sed -n '/^jobfeatures/s/^jobfeatures *= *\(.*\)/\1/p' /etc/wlcg-wn-env.conf 2> /dev/null`" |
22 |
|
|
# fallback if setting is missing |
23 |
|
|
JOBFEATURES=${TMPDIR:-/tmp}/jobfeatures.${PBS_JOBID} |
24 |
|
|
|
25 |
|
|
rm -f ${JOBFEATURES} |
26 |
|
|
|