TT#32751 Check CD integrity

Write md5 sum during the building of ISO file
Check md5 sum before installation

Change-Id: I27ac12816a750e9e6400eb28a5c5f1edd7f3b101
changes/77/19977/5
Mykola Malkov 9 years ago
parent be0527da42
commit df0420ecb8

@ -80,6 +80,8 @@ sudo /usr/sbin/grml2iso -c ./${TEMPLATES} -o "${SIPWISE_ISO}" "${GRML_ISO}"
echo "*** Generating dd-able ISO ***"
sudo /usr/bin/isohybrid "${SIPWISE_ISO}"
sudo implantisomd5 "${SIPWISE_ISO}"
echo "*** Generating SHA1 and MD5 checksum files ***"
sha1sum "${SIPWISE_ISO}" > "${SIPWISE_ISO}.sha1"
md5sum "${SIPWISE_ISO}" > "${SIPWISE_ISO}.md5"

@ -0,0 +1,17 @@
#!/bin/bash
set -e
message="Do you want to check the install media?"
if dialog --yes-label Yes --no-label Skip --yesno "${message}" 0 0 ; then
sudo apt-get update 1>/dev/null || true
sudo apt-get install isomd5sum --assume-yes 1>/dev/null || true
if ! result="$( { checkisomd5 /dev/sr0 1>/dev/null; } 2>&1 )" ; then
err_message="Integrity check failed. Reason: ${result}. Abort installation or continue anyway?"
if dialog --yes-label Exit --no-label Continue --yesno "${err_message}" 0 0 ; then
exit 1
else
exit 0
fi
fi
fi

@ -157,6 +157,7 @@ deploy() {
install_sipwise_keyring
network_check
"${scripts_dir}/check_installing_version.sh"
"${scripts_dir}/verify_iso_image.sh"
prompt_for_target
check_for_existing_pvs
report_ssh_password

Loading…
Cancel
Save