From fb52a4a50c727257c3b70cda54386267ba0f7a65 Mon Sep 17 00:00:00 2001 From: sayalilunkad Date: Fri, 21 Nov 2014 13:31:02 +0530 Subject: [PATCH] Removes ISO image if found corrupt This patch automatically removes the corrupt ISO image if md5sum doesn't match and prompts user to re-run osbash script as oppose to asking the user to remove the corrupt image. Change-Id: I0dae5d7b88980a5644ec684f8cc8f04697f06e8b --- labs/lib/osbash/virtualbox.install_base | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/labs/lib/osbash/virtualbox.install_base b/labs/lib/osbash/virtualbox.install_base index b40848d6..ddcf1831 100644 --- a/labs/lib/osbash/virtualbox.install_base +++ b/labs/lib/osbash/virtualbox.install_base @@ -15,8 +15,10 @@ function check_md5 { if $md5exe "$file" | grep -q "$csum"; then echo >&2 "okay." else - echo >&2 "failed." - echo >&2 "Aborting. Please fix or remove the ISO image." + echo >&2 "Verification failed. ISO image is corrupt." + echo >&2 "Removing the ISO image." + rm "$file" + echo >&2 "Please re-run osbash script." exit 1 fi }