Commit 937fbcc2 authored by Stefano Belforte's avatar Stefano Belforte
Browse files

initial version

parent d13c46e9
CE-sft-wn
CE-sft-lcg-rm
CE-sft-vo-tag
CE-cms-swinst
#!/bin/bash
echo "<h2>Preliminary checks</h2>"
echo "<pre>"
set -x
voms-proxy-info -identity -fqan
id
set +x
echo "</pre>"
echo "<h2>Checking software directory for CMS VO</h2>"
vo_dir=$VO_CMS_SW_DIR
echo "Checking variable: \$VO_CMS_SW_DIR=$vo_dir"
echo "<pre>"
set -x
ls -ld $vo_dir
result=$?
set +x
echo "</pre>"
echo
if [ $result != 0 ]
then
echo "ERROR: software directory non existent or non readable"
exit $SAME_ERROR
fi
echo "<pre>"
set -x
touch $vo_dir/.sametest
result=$?
set +x
echo "</pre>"
echo
if [ $result != 0 ]
then
echo "WARNING: cannot write to software area"
fi
echo "<h2>Sourcing the CMS environment</h2>"
echo "<pre>"
echo "source $VO_CMS_SW_DIR/cmsset_default.sh"
source $VO_CMS_SW_DIR/cmsset_default.sh
result=$?
echo "</pre>"
echo
if [ $result != 0 ]
then
echo "ERROR: Could not find the CMS software initialisation script"
exit $SAME_ERROR
fi
echo "<h2>Make sure configuration directory is there</h2>"
echo "Checking variable: \$CMS_PATH=$CMS_PATH"
echo "<p>"
if [ -z $CMS_PATH ]; then
echo "ERROR: CMS_PATH not defined"
exit $SAME_ERROR
fi
if [ ! -d $CMS_PATH ] ; then
echo "ERROR: CMS_PATH directory $CMS_PATH not existing"
exit $SAME_ERROR
fi
if [ ! -d $CMS_PATH/SITECONF/local/JobConfig ] ; then
echo "ERROR: JobConfig directory $CMS_PATH/local/SITECONF/JobConfig not existing"
exit $SAME_ERROR
fi
echo "<p>"
echo "OK"
echo "<h2>Make sure configuration file exists</h2>"
ConfigFile=${CMS_PATH}/SITECONF/local/JobConfig/site-local-config.xml
echo "Configuration file: $ConfigFile"
echo "<p>"
if [ ! -f $ConfigFile ] ; then
echo "ERROR: Local Configuration file site-local-config.xml not existing"
exit $SAME_ERROR
fi
echo "<p>"
echo "OK"
echo "<h2>Make sure local configuration file has entries for TriviaFileCatalog,
local stage out and Squid</h2>"
bad=0
grep -q "trivialcatalog" $ConfigFile
status=$?
if [ $status != 0 ] ; then
echo "ERROR: TrivialFileCatlog string missing"
bad=1
fi
grep -q "local-stage-out" $ConfigFile
status=$?
if [ $status != 0 ] ; then
echo "ERROR: LocalStageOut string missing"
bad=1
fi
grep -q "frontier-connect" $ConfigFile
status=$?
if [ $status != 0 ] ; then
echo "ERROR: Frontier Configuration string missing"
bad=1
fi
if [ $bad == 1 ] ; then
echo "ERROR: invalid local configuration file $ConfigFile"
exit $SAME_ERROR
fi
echo "<p>"
echo "OK"
exit $SAME_OK
testName: CE-cms-swinst
testTitle: CMS sw area
testAbbr: swinst
testHelp: none
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