Changeset 8857
- Timestamp:
- 02/08/08 12:56:38 (17 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8851 r8857 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2008/02/08 Stefan Ruegamer 22 23 * datacenter/scripts/checkmd5sum 24 - added check to prevent that checksums of files not read from tape 25 enter the .lapalma file 26 27 20 28 21 29 2008/02/01 Stefan Ruegamer -
trunk/MagicSoft/Mars/datacenter/scripts/checkmd5sum
r8682 r8857 1 #!/bin/ sh1 #!/bin/bash 2 2 # 3 3 # ======================================================================== … … 46 46 if [ ! -f $file ] 47 47 then 48 49 48 echo "tape $file not found -> aborting" 49 exit 50 50 fi 51 51 52 if [ ${checkpath}/tape_${id}.md5.lapalma ] || [ -f ${checkpath}/tape_${id}.md5.wue ]52 if [ -f ${checkpath}/tape_${id}.md5.lapalma ] || [ -f ${checkpath}/tape_${id}.md5.wue ] 53 53 then 54 55 56 57 58 59 60 54 echo "Output files already existing. Are you sure you wish to continue (yes/no)?" 55 read cont 56 if [ ! $cont == "yes" ] 57 then 58 echo "Aborting." 59 exit 60 fi 61 61 fi 62 62 63 63 date | tee ${checkpath}/tape_${id}.md5.lapalma | tee ${checkpath}/tape_${id}.md5.wue 64 64 … … 66 66 while read line 67 67 do 68 muxchk=`echo $line | cut -d/ -f1` 69 # only check muxdata, not cc-, caco- or drivelog-files 70 if [ "$muxchk" = "muxdata" ] 71 then 72 sum=($line) 73 # reformat the files and checksums correctly and compare them 74 echo "${sum[1]} ${sum[0]}" >> ${checkpath}/tape_${id}.md5.lapalma 75 76 ssh -nx phoenix nice -n 19 /opt/csw/bin/gmd5sum /magic/datacenter/fromtape/${sum[0]} | sed -e 's/\/magic\/datacenter\/fromtape\///' >> ${checkpath}/tape_${id}.md5.wue 77 #md5sum /magic/datacenter/fromtape/${sum[0]} | sed -e 's/\/magic\/datacenter\/fromtape\///' >> ${checkpath}/tape_${id}.md5.wue 78 fi 68 muxchk=`echo $line | cut -d/ -f1` 69 type=`echo $line | cut -d_ -f7 | cut -c0-5` 70 # only check muxdata rawfiles, not cc-, caco- or drivelog-files 71 if [ "$muxchk" = "muxdata" ] && [ "$type" = "E.raw" ] 72 then 73 sum=($line) 74 75 # check if the file has been extracted from tape; if not, don't write anything to the logfiles (so they can still be compared) 76 if [ ! -f /magic/datacenter/fromtape/${sum[0]} ] 77 then 78 echo "File ${sum[0]} does not exist." 79 continue 80 fi 81 82 # reformat the files and checksums correctly and compare them 83 echo "${sum[1]} ${sum[0]}" >> ${checkpath}/tape_${id}.md5.lapalma 84 85 ssh -nx phoenix nice -n 19 /opt/csw/bin/gmd5sum /magic/datacenter/fromtape/${sum[0]} | sed -e 's/\/magic\/datacenter\/fromtape\///' >> ${checkpath}/tape_${id}.md5.wue 86 #md5sum /magic/datacenter/fromtape/${sum[0]} | sed -e 's/\/magic\/datacenter\/fromtape\///' >> ${checkpath}/tape_${id}.md5.wue 87 fi 79 88 done < $file 80 89 … … 83 92 if [ ! -f ${checkpath}/tape_${id}.md5.lapalma ] || [ ! -f ${checkpath}/tape_${id}.md5.wue ] 84 93 then 85 86 94 echo "No output files written! Something went wrong... -> aborting" 95 exit 87 96 fi 88 97 … … 95 104 if [ "$output" = "" ] 96 105 then 97 echo "All checksums are ok!" 106 echo "All checksums are ok! Launching movingrawfiles now."# to be included 98 107 else 99 108 echo -e "The files are not identical! diff found the following differences:\n$output" 100 109 fi 101 110
Note:
See TracChangeset
for help on using the changeset viewer.