Ignore:
Timestamp:
02/19/09 21:22:19 (16 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/scripts/movingrawfiles

    r9198 r9355  
    4141umask 0002
    4242
    43 scriptlog=$runlogpath/$program-$datetime.log
    44 date >> $scriptlog 2>&1
    45 
    4643# check whether script is already running
    4744lockfile=$lockpath/lock-$program.txt
    48 checklock  >> $scriptlog 2>&1
     45checklock
    4946
    5047# change permission for files
    51 ssh tape@dc07 chmod -R g+w /magic/datacenter/fromtape/rawdata/* >> $scriptlog 2>&1
     48ssh tape@dc07 chmod -R g+w /magic/datacenter/fromtape/rawdata/*
    5249
    5350# find rawfiles belonging to tape (don't move files not yet md5-sum checked)
     
    5653if [ "$rawfiles" == "" ]
    5754then
    58    echo "no files to move -> exit" >> $scriptlog 2>&1
    59    finish >> $scriptlog 2>&1
     55   printprocesslog "INFO no files to move -> exit"
     56   finish
    6057fi
    6158
     
    7572      newrawfile=`echo $rawfile | sed -e 's/\/fromtape\/muxdata//g' -e 's/_/\//1' -e 's/_/\//1'`
    7673   else
    77       echo "ERROR something is wrong with the path of file $rawfile -> continue" >> $scriptlog 2>&1
    7874      printprocesslog "ERROR moving rawfile $rawfile failed"
    7975      continue
     
    8177   
    8278   newdir=`dirname $newrawfile`
    83    makedir $newdir >> $scriptlog 2>&1
     79   makedir $newdir
    8480   
    85    mv -v $rawfile $newrawfile >> $scriptlog 2>&1
     81   mv -v $rawfile $newrawfile
    8682done
    8783
    88 rmdir -v /magic/{datacenter,data/rawfiles}/fromtape/???data/* >> $scriptlog 2>&1
     84rmdir -v /magic/{datacenter,data/rawfiles}/fromtape/???data/*
    8985
    9086printprocesslog "INFO launching filesondisk"
    91 echo "launching filesondisk" >> $scriptlog 2>&1
    9287$scriptspath/filesondisk &
    9388
    94 finish >> $scriptlog 2>&1
     89finish
Note: See TracChangeset for help on using the changeset viewer.