-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGLITE
More file actions
executable file
·56 lines (48 loc) · 1.49 KB
/
GLITE
File metadata and controls
executable file
·56 lines (48 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/sh
if [ "x$1" = "x0" ]; then
# Set environment variable containing queue name
env_idx=0
env_var="joboption_env_$env_idx"
while [ -n "${!env_var}" ]; do
env_idx=$((env_idx+1))
env_var="joboption_env_$env_idx"
done
export RUNTIME_ENABLE_MULTICORE_SCRATCH=1
eval joboption_env_$env_idx="NORDUGRID_ARC_QUEUE=$joboption_queue"
fi
if [ "x$1" = "x1" ]; then
# Set grid environment
if [ -e /etc/profile.d/env.sh ]; then
source /etc/profile.d/env.sh
fi
if [ -e /etc/profile.d/grid-env.sh ]; then
source /etc/profile.d/grid-env.sh
fi
if [ -e /etc/profile.d/zz-env.sh ]; then
source /etc/profile.d/zz-env.sh
fi
# Set basic environment variables
HOME=`pwd`
export HOME
USER=`whoami`
export USER
HOSTNAME=`hostname -f`
export HOSTNAME
# Don't use locale from the ARC CE hosts
export LANG=en_US.utf8
# Grid middleware
if grep -q "CentOS release 6" /etc/redhat-release; then
source /cvmfs/grid.cern.ch/emi-wn-3.15.3-1_sl6v1/etc/profile.d/setup-wn-example.sh
elif grep -q "CentOS Linux release 7" /etc/redhat-release; then
source /cvmfs/grid.cern.ch/centos7-wn-preview-v02/etc/profile.d/setup-c7-wn-example.sh
else
echo "ERROR, unexpected /etc/redhat-release contents - no grid middleware available"
fi
# Machine job features
if [ -x /usr/sbin/make-jobfeatures ]; then
export JOBFEATURES=`/usr/sbin/make-jobfeatures`
fi
if [ -d /etc/machinefeatures ] ; then
export MACHINEFEATURES=/etc/machinefeatures
fi
fi