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