Commit a7c738b4 authored by Andrea Sciaba's avatar Andrea Sciaba
Browse files

Solved bug that made the basic test to hang at mktemp at some sites

parent d6509c1c
......@@ -68,6 +68,7 @@ echo
echo "Printing CMS site local config information..."
echo
echo Hostname: `hostname`
echo System time: `date`
tmpfile=`mktemp /tmp/tmp.XXXXXXXXXX`
source $SW_DIR/cmsset_default.sh > $tmpfile 2>&1
result=$?
......
......@@ -52,10 +52,18 @@ if [ $useSquid == 1 ] ; then
echo "http_proxy: ${http_proxy}"
fi
wgetOutput=`mktemp`
cmd="curl --connect-timeout 30 -m 30 --fail --request GET --header \"PRIVATE-TOKEN: kuD9s3WrDGNXZ8BvxFV2\" $url -o $file"
wgetOutput=`mktemp /tmp/wget.XXXX`
if [ $? != 0 ] ; then
exit 1
fi
cmd="timeout -s 9 1m curl --connect-timeout 30 -m 30 --fail --request GET --header \"PRIVATE-TOKEN: kuD9s3WrDGNXZ8BvxFV2\" $url -o $file"
cmdFile=`mktemp /tmp/cmd.XXXX`
if [ $? != 0 ] ; then
exit 1
fi
cmdFile=`mktemp`
echo "$cmd > $wgetOutput 2>&1" > $cmdFile
source $cmdFile
rc=$?
......@@ -70,6 +78,7 @@ if [ $rc != 0 ] ; then
source $cmdFile
rc=$?
if [ $rc != 0 ] ; then
echo "curl error code: $rc"
echo
echo "ERROR: Failed to retrieve $file from $url without squid"
else
......
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