diff options
Diffstat (limited to 'app-misc/rogentoslive-tools/files/1.0/sabayon-live-check')
-rw-r--r-- | app-misc/rogentoslive-tools/files/1.0/sabayon-live-check | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/app-misc/rogentoslive-tools/files/1.0/sabayon-live-check b/app-misc/rogentoslive-tools/files/1.0/sabayon-live-check new file mode 100644 index 00000000..4dc2e739 --- /dev/null +++ b/app-misc/rogentoslive-tools/files/1.0/sabayon-live-check @@ -0,0 +1,26 @@ +#!/bin/sh +# +# sabayon_livechk.sh +# +# Checks the integrity of a LiveCD/DVD by passing the +# contents of the image through a md5sum (to be compared +# with an documented value elsewhere). +# + +if ( ! isoinfo -d -i /dev/cdrom >>/dev/null 2>/dev/null ); then + echo "CDROM/DVD image not found!" + exit 1 +fi + +echo -e "Checking image integrity, please allow several minutes...\n" +echo "You can check for errors by running 'tail /var/log/messages'" +echo "in another console window. If you encounter multiple device" +echo "errors with you cdrom, this probably indicates the test is failing." +echo "You may type 'Ctrl-c' to abort the check." + +BLOCK_SIZE=`isoinfo -d -i /dev/cdrom | grep "Logical block size is" | cut -d: -f2 | sed 's/^[ ]//g'` +VOL_SIZE=`isoinfo -d -i /dev/cdrom | grep "Volume size is" | cut -d: -f2 | sed 's/^[ ]//g'` +dd if=/dev/cdrom bs=$BLOCK_SIZE count=$VOL_SIZE conv=notrunc,noerror | md5sum + +echo "Compare the above value with the value supplied in" +echo "the release notes for this version at:" |