1 |
janjust |
2553 |
# WLCG Worker Node Environment profile.d script |
2 |
|
|
# |
3 |
|
|
# Copyright (c) 2012 by |
4 |
|
|
# Jan Just Keijser (janjust@nikhef.nl) |
5 |
|
|
# Nikhef |
6 |
|
|
# Amsterdam |
7 |
|
|
# The Netherlands |
8 |
|
|
|
9 |
|
|
# Get the configuration setting from the /etc/wlcg_wn_env.conf file |
10 |
|
|
eval "JOBFEATURES=`sed -n '/^jobfeatures/s/^jobfeatures *= *\(.*\)/\1/p' /etc/wlcg_wn_env.conf 2> /dev/null`" |
11 |
|
|
|
12 |
|
|
# fallback if setting is missing |
13 |
|
|
JOBFEATURES=${TMPDIR:-/tmp}/jobfeatures.${PBS_JOBID} |
14 |
|
|
|
15 |
|
|
export JOBFEATURES |
16 |
|
|
|
17 |
|
|
# if this profile.d script is called with the parameter --csh |
18 |
|
|
# then a 'setenv' line is written to stdout. |
19 |
|
|
# the output of this command can be evaluated by a csh-like shell. |
20 |
|
|
# (currently not needed as the jobwrappers run as bash and set the |
21 |
|
|
# right env vars for all child scripts, including csh scripts) |
22 |
|
|
if [ "x$1" = "x--csh" ] |
23 |
|
|
then |
24 |
|
|
echo "setenv JOBFEATURES ${JOBFEATURES}" |
25 |
|
|
fi |
26 |
|
|
|