Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 7635)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 7636)
@@ -18,4 +18,11 @@
 
                                                  -*-*- END OF LINE -*-*-
+
+ 2006/04/12 Daniela Dorner, Daniel Hoehne
+
+   * datacenter/scripts/makecallistolinks:
+     - fixed bug
+
+
 
  2006/04/12 Thomas Bretz
Index: /trunk/MagicSoft/Mars/datacenter/scripts/makecallistolinks
===================================================================
--- /trunk/MagicSoft/Mars/datacenter/scripts/makecallistolinks	(revision 7635)
+++ /trunk/MagicSoft/Mars/datacenter/scripts/makecallistolinks	(revision 7636)
@@ -55,5 +55,6 @@
 reason1="Pulse is too much to the right, cannot go beyond logain limits!"
 reason2="Pulse is too much to the left, cannot go below 0!"
-echo "reason: "$reason >> $scriptlog 2>&1
+echo "reason1: "$reason1 >> $scriptlog 2>&1
+echo "reason2: "$reason2 >> $scriptlog 2>&1
 
 # find files containing reason 
@@ -73,13 +74,16 @@
 for file in $files
 do 
-   pulse=`cat $file | grep "$reason1\|$reason2"` >> $scriptlog 2>&1
+   pulse=`cat $file | grep "$reason1\|$reason2"`
    sequ=`echo $file | cut -d/ -f6`
+   path=`dirname $file`
+   callistorc=$dirname/$callistorcseq
 
    if [ ! "$pulse" = "" ]
    then
-      if ! ls -l $callistorcseq | grep $callistorcnew >> $scriptlog 2>&1
+      if ! ls -l $callistorc | grep $callistorcnew >> $scriptlog 2>&1
       then 
          # resetting the calibration
          echo "resetting the callisto for sequence $sequ" >> $scriptlog 2>&1
+         echo "  reason: $pulse" >> $scriptlog 2>&1
          resetlogpath=$logpath/resetcallisto
          echo "resetlogpath: $resetlogpath" >> $scriptlog 2>&1
@@ -94,7 +98,6 @@
                  continue ;;
          esac
-      #linking callisto.rc
-      path=`dirname $file` >> $scriptlog 2>&1
-      ln -vfs $setuppath/callisto/$callistorcnew $path/$callistorcseq >> $scriptlog 2>&1
+         #linking callisto.rc
+         ln -vfs $setuppath/callisto/$callistorcnew $callistorc >> $scriptlog 2>&1
       fi
    fi
