Guest User

Untitled

a guest
Mar 3rd, 2012
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. #!/bin/bash
  2. #wymagane genisoimage
  3. #Inputs
  4. #diskdevice=$1 #or read -e diskdevice isotocheck (use bash /path/to/script.$
  5. #isotocheck=$2
  6. echo "Enter /dev/device /path/to/iso example: /dev/sr0 /home/kara/image.iso"
  7. read -e diskdevice isotocheck
  8. blocksize=`isoinfo -d -i $diskdevice | grep "^Logical block size is:" | cut -d $
  9. extens=`echo $(( $(ls -l $isotocheck | awk '{ print $5 }') / $blocksize ))`
  10. #echo "block size: $blocksize block count: $extens"
  11.  
  12. echo "Creating md5 of iso file..."
  13. md5file=`md5sum $isotocheck`
  14. echo "Ok, reading and creating md5 of cd/dvd disk..."
  15. md5disk=`dd if=$diskdevice bs=$blocksize count=$extens conv=notrunc,noerror | m$
  16. if [ `echo $md5disk | awk '{ print $1 }'` = `echo $md5file | awk '{ print $1 }'$
  17. echo "CD is OK!"
  18. else
  19. echo "Verify failure!"
Advertisement
Add Comment
Please, Sign In to add comment