Index: /trunk/DataCheck/QuickLook/Step1.sh
===================================================================
--- /trunk/DataCheck/QuickLook/Step1.sh	(revision 15557)
+++ /trunk/DataCheck/QuickLook/Step1.sh	(revision 15558)
@@ -62,13 +62,18 @@
 }
 
-diskusage=( `df -P /raid10 | grep raid10 ` )
-# check if more than 700 GB are left on /loc_data
-if [ ${diskusage[3]} -lt 800000000 ] 
-then
-   echo "WARN less than 700 left on /raid10 on node "$HOSTNAME
-   printprocesslog "WARN less than 700 left on /raid10 on node "$HOSTNAME
-   df -h /raid10
-   finish
-fi
+function check_daq()
+{
+   diskusage=( `df -P /raid10 | grep raid10 ` )
+   # check if more than 700 GB are left on /loc_data
+   if [ ${diskusage[3]} -lt 800000000 ] 
+   then
+      echo "WARN less than 700 left on /raid10 on node "$HOSTNAME
+      printprocesslog "WARN less than 700 left on /raid10 on node "$HOSTNAME
+      df -h /raid10
+      finish
+   fi
+}
+
+check_daq
 
 printprocesslog "INFO get lists of raw files on newdaq and daq"
@@ -91,4 +96,8 @@
 while [ ${#fileslocal[@]} -ne ${#files[@]} ] || [ $numdataruns -ne ${#callistofiles[@]} ]
 do
+   # only continue with script 
+   #  when there is more than 10% space on daq
+   check_daq
+   
    numdataruns=0
    #echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #data-runs:"$numdataruns
