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
This commit is contained in:
parent
9a5fd5ee8a
commit
fb52a4a50c
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user