summaryrefslogtreecommitdiff
path: root/kogaion-live-check
diff options
context:
space:
mode:
Diffstat (limited to 'kogaion-live-check')
-rw-r--r--kogaion-live-check27
1 files changed, 27 insertions, 0 deletions
diff --git a/kogaion-live-check b/kogaion-live-check
new file mode 100644
index 0000000..adab0f9
--- /dev/null
+++ b/kogaion-live-check
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# kogaion_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:"
+echo "http://www.kogaion.ro/"