Commit 3be18b82 authored by Brian Paul Bockelman's avatar Brian Paul Bockelman
Browse files

Fix CMSSW area initialization code.

parent 960e1ee5
......@@ -52,21 +52,31 @@ fi
# workaround to suppress voms errors on OSG
export VOMS_PROXY_INFO_DONT_VERIFY_AC="1"
# Setup the grid environment:
if [ -n "$OSG_GRID" ] ; then
[ -f $OSG_GRID/setup.sh ] && source $OSG_GRID/setup.sh
fi
dn=`voms-proxy-info --identity`
fqan=`voms-proxy-info --fqan | head -1`
add2buffer "DN: $dn"
add2buffer "Primary FQAN: $fqan"
# Set the CMS environment
if [ -n "$OSG_APP" ] ; then
SW_DIR=$OSG_APP/cmssoft/cms
[ -f $OSG_GRID/setup.sh ] && source $OSG_GRID/setup.sh
add2buffer "OSG_APP/cmssoft/cms=$OSG_APP/cmssoft/cms"
elif [ -n "$VO_CMS_SW_DIR" ]; then
if [ -n "$VO_CMS_SW_DIR" ]; then
SW_DIR=$VO_CMS_SW_DIR
add2buffer "VO_CMS_SW_DIR=$VO_CMS_SW_DIR"
elif [ -n "$OSG_APP" ] ; then
SW_DIR=$OSG_APP/cmssoft/cms
add2buffer "OSG_APP/cmssoft/cms=$OSG_APP/cmssoft/cms"
elif [ -n "$CVMFS" ] ; then
SW_DIR=$CVMFS/cms.cern.ch
add2buffer "CVMFS (via env)=$CVMFS/cms.cern.ch"
elif [ -e "/cvmfs/cms.cern.ch" ] ; then
SW_DIR=/cvmfs/cms.cern.ch
add2buffer "CVMFS=/cvmfs/cms.cern.ch"
else
do_print "Error: Neither VO_CMS_SW_DIR nor OSG_APP defined"
do_print "Error: None of OSG_APP, VO_CMS_SW_DIR, or CVMFS are present."
exit $NAG_CRITICAL
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment