Commit 73a8cd52 authored by Christoph Wissing's avatar Christoph Wissing
Browse files

Add check for gfal-copy.

parent 659dad4d
......@@ -10,6 +10,7 @@
# if the siteis not CERN and is not using CERNVM-FS
# - prints the type and version of middleware
# - the required version of lcg-cp is installed
# - checks for gfal-copy, informal print out only
# String exit codes:
# NO_CERT_DIR: did not find the X.509 certificate directory
# NO_PROXY: did not find the proxy
......@@ -23,6 +24,7 @@
# TMP_LOW_QUOTA: less than 10 GB of free quota
# LCG_CP_MISSING: the lcg-cp command is not in the PATH
# STAGEOUT_CMD_INVALID: the version of the stageout command is too old
# GFAL_COPY_MISSING: gfal-copy not in the PATH (no error, as of Sep 2014)
# OK: everything is OK
export LANG=C
......@@ -49,6 +51,8 @@ function check_quota {
}
warn=0
info=0
echo "Printing preliminary information..."
echo
echo -n "Sysinfo: "
......@@ -282,11 +286,36 @@ else
exit $SAME_ERROR
fi
fi
type -t gfal-copy > /dev/null
result=$?
if [ $result -ne 0 ] ; then
echo "INFO: gfal-copy not in the PATH"
summary="summary: GFAL_COPY_MISSING"
info=1
else
gfalver=`gfal-copy -V 2>&1`
echo "GFAL2 clients: $gfalver"
gver=(`echo $gfalver | awk -F . '{print $1*10000+$2*100+$3}'`)
echo -n "Minimum version of gfal-copy: 1.0.0: "
if [ $gver -ge 10000 ] ; then
echo "OK"
else
echo
echo "INFO: Version of gfal-copy insufficient"
summary="summary: Insufficient gfal-copy version"
info=1
fi
fi
echo
if [ $warn == 1 ] ; then
echo $summary
exit $SAME_WARNING
fi
if [ $info == 1 ] ; then
echo $summary
exit $SAME_INFO
fi
echo "All checks OK"
echo "summary: OK"
exit $SAME_OK
Supports Markdown
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