From a10aa9e38a2ce95fd0cf74b6bb1bc4471fcfa9a7 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sun, 21 Nov 2010 23:00:38 +0100 Subject: [PATCH] config/release: add MD5 check to 'create_installstick' Signed-off-by: Stephan Raue --- config/release/create_installstick | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/config/release/create_installstick b/config/release/create_installstick index faebd19fd6..2d44276291 100755 --- a/config/release/create_installstick +++ b/config/release/create_installstick @@ -56,6 +56,25 @@ echo "# Please read the instructions and use very carefully.. #" echo "# #" echo "#########################################################" +# check MD5 sums + echo "checking MD5 sum..." + md5sum -c target/KERNEL.md5 + MD5_ERROR=$? + md5sum -c target/SYSTEM.md5 + MD5_ERROR=$? + +if [ $MD5_ERROR = 1 ]; then + echo "#########################################################" + echo "# #" + echo "# OpenELEC.tv failed md5 check - Installation will quit #" + echo "# #" + echo "# Your original download was probably corrupt. #" + echo "# Please visit www.openelec.tv and get another copy #" + echo "# #" + echo "#########################################################" + exit 1 +fi + # (TODO) umount anything umount $PART