Index: trunk/MagicSoft/Mars/datacenter/scripts/makecallistolinks
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/makecallistolinks	(revision 9107)
+++ trunk/MagicSoft/Mars/datacenter/scripts/makecallistolinks	(revision 9355)
@@ -41,10 +41,7 @@
 set -C
 
-scriptlog=$runlogpath/$program`date +%F`.log
-date >> $scriptlog 2>&1
-
 # check if script is already running
 lockfile=$lockpath/lock-$program.txt
-checklock  >> $scriptlog 2>&1
+checklock 
 
 callistorcseq=callisto.rc
@@ -56,6 +53,6 @@
 if [ ${#primaries[@]} -eq 0 ]
 then 
-   echo "nothing to do -> exit"  >> $scriptlog 2>&1
-   finish >> $scriptlog 2>&1
+   printprocesslog "INFO nothing to do -> exit" 
+   finish 
 fi
 num=`expr ${#primaries[@]} / 2 `
@@ -69,12 +66,12 @@
    telnum=${primaries[$s+$s+1]}
    callistorc=$datapath/callisto/`printf %08d $sequence | cut -c 0-4`/`printf %08d $sequence`/$callistorcseq
-   if ! ls -l $callistorc 2>/dev/null | grep $callistorcnew >> $scriptlog 2>&1
+   if ! ls -l $callistorc 2>/dev/null | grep $callistorcnew 
    then 
       printprocesslog "INFO linking $callistorcnew to $callistorc for sequ $sequence"
       # resetting the calibration
-      echo "resetting the callisto for sequence $sequence" >> $scriptlog 2>&1
+      printprocesslog "INFO resetting the callisto for sequence $sequence" 
 
       query="UPDATE SequenceProcessStatus set fStartTime=NULL, fFailedTime=NULL, fProgramId=NULL, fReturnCode=NULL where fSequenceFirst=$sequence and fTelescopeNumber=$telnum"
-      if ! sendquery >> $scriptlog 2>&1
+      if ! sendquery 
       then 
          printprocesslog "ERROR resetting calibration failed for sequence $sequence"
@@ -85,5 +82,5 @@
       
       #linking callisto.rc
-      if ln -vfs $setuppath/callisto/$callistorcnew $callistorc >> $scriptlog 2>&1
+      if ln -vfs $setuppath/callisto/$callistorcnew $callistorc 
       then 
          printprocesslog "INFO link callisto.rc successfully for sequence $sequence"
@@ -95,4 +92,4 @@
 done
 
-finish >> $scriptlog 2>&1
+finish 
 
