2021-10-19 09:42:32 +00:00
|
|
|
|
2021-10-24 10:52:09 +00:00
|
|
|
if [ -e "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.md5" ]; then
|
|
|
|
set default=0
|
2022-12-02 12:35:59 +00:00
|
|
|
menuentry "@VTMENU_CHKSUM_MD5_CALC_CHK" --class=checksum_md5 {
|
2021-10-24 10:52:09 +00:00
|
|
|
md5sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
|
|
|
|
|
|
|
vt_1st_line "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.md5" vtReadChecksum
|
2021-10-25 01:29:51 +00:00
|
|
|
|
|
|
|
if vt_str_casebegin "$vtReadChecksum" "$VT_LAST_CHECK_SUM"; then
|
2021-10-24 10:52:09 +00:00
|
|
|
echo -e "\n\nCheck MD5 value with .md5 file. [ OK ]"
|
|
|
|
else
|
|
|
|
echo -e "\n\nCheck MD5 value with .md5 file. [ FAIL ]"
|
|
|
|
echo "The MD5 value in .md5 file is:"
|
|
|
|
echo "$vtReadChecksum"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo -e "\n\npress ENTER to exit ..."
|
|
|
|
read vtInputKey
|
|
|
|
}
|
|
|
|
else
|
2022-12-02 12:35:59 +00:00
|
|
|
menuentry "@VTMENU_CHKSUM_MD5_CALC" --class=checksum_md5 {
|
2021-10-24 10:52:09 +00:00
|
|
|
md5sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
|
|
|
|
|
|
|
echo -e "\n\npress ENTER to exit ..."
|
|
|
|
read vtInputKey
|
|
|
|
}
|
|
|
|
fi
|
2021-10-19 09:42:32 +00:00
|
|
|
|
2021-10-24 10:52:09 +00:00
|
|
|
if [ -e "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha1" ]; then
|
|
|
|
set default=1
|
2022-12-02 12:35:59 +00:00
|
|
|
menuentry "@VTMENU_CHKSUM_SHA1_CALC_CHK" --class=checksum_sha1 {
|
2021-10-24 10:52:09 +00:00
|
|
|
sha1sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
|
|
|
|
|
|
|
vt_1st_line "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha1" vtReadChecksum
|
|
|
|
|
2021-10-25 01:29:51 +00:00
|
|
|
if vt_str_casebegin "$vtReadChecksum" "$VT_LAST_CHECK_SUM"; then
|
2021-10-24 10:52:09 +00:00
|
|
|
echo -e "\n\nCheck SHA1 value with .sha1 file. [ OK ]"
|
|
|
|
else
|
|
|
|
echo -e "\n\nCheck SHA1 value with .sha1 file. [ FAIL ]"
|
|
|
|
echo "The SHA1 value in .sha1 file is:"
|
|
|
|
echo "$vtReadChecksum"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo -e "\n\npress ENTER to exit ..."
|
|
|
|
read vtInputKey
|
|
|
|
}
|
|
|
|
else
|
2022-12-02 12:35:59 +00:00
|
|
|
menuentry "@VTMENU_CHKSUM_SHA1_CALC" --class=checksum_sha1 {
|
2021-10-24 10:52:09 +00:00
|
|
|
sha1sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
|
|
|
|
|
|
|
echo -e "\n\npress ENTER to exit ..."
|
|
|
|
read vtInputKey
|
|
|
|
}
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ -e "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha256" ]; then
|
|
|
|
set default=2
|
2022-12-02 12:35:59 +00:00
|
|
|
menuentry "@VTMENU_CHKSUM_SHA256_CALC_CHK" --class=checksum_sha256 {
|
2021-10-24 10:52:09 +00:00
|
|
|
sha256sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
|
|
|
|
|
|
|
vt_1st_line "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha256" vtReadChecksum
|
|
|
|
|
2021-10-25 01:29:51 +00:00
|
|
|
if vt_str_casebegin "$vtReadChecksum" "$VT_LAST_CHECK_SUM"; then
|
2021-10-24 10:52:09 +00:00
|
|
|
echo -e "\n\nCheck SHA256 value with .sha256 file. [ OK ]"
|
|
|
|
else
|
|
|
|
echo -e "\n\nCheck SHA256 value with .sha256 file. [ FAIL ]"
|
|
|
|
echo "The SHA256 value in .sha256 file is:"
|
|
|
|
echo "$vtReadChecksum"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo -e "\n\npress ENTER to exit ..."
|
|
|
|
read vtInputKey
|
|
|
|
}
|
|
|
|
else
|
2022-12-02 12:35:59 +00:00
|
|
|
menuentry "@VTMENU_CHKSUM_SHA256_CALC" --class=checksum_sha256 {
|
2021-10-24 10:52:09 +00:00
|
|
|
sha256sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
|
|
|
|
|
|
|
echo -e "\n\npress ENTER to exit ..."
|
|
|
|
read vtInputKey
|
|
|
|
}
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ -e "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha512" ]; then
|
|
|
|
set default=3
|
2022-12-02 12:35:59 +00:00
|
|
|
menuentry "@VTMENU_CHKSUM_SHA512_CALC_CHK" --class=checksum_sha512{
|
2021-10-24 10:52:09 +00:00
|
|
|
sha512sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
|
|
|
|
|
|
|
vt_1st_line "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha512" vtReadChecksum
|
|
|
|
|
2021-10-25 01:29:51 +00:00
|
|
|
if vt_str_casebegin "$vtReadChecksum" "$VT_LAST_CHECK_SUM"; then
|
2021-10-24 10:52:09 +00:00
|
|
|
echo -e "\n\nCheck SHA512 value with .sha512 file. [ OK ]"
|
|
|
|
else
|
|
|
|
echo -e "\n\nCheck SHA512 value with .sha512 file. [ FAIL ]"
|
|
|
|
echo "The SHA512 value in .sha512 file is:"
|
|
|
|
echo "$vtReadChecksum"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo -e "\n\npress ENTER to exit ..."
|
|
|
|
read vtInputKey
|
|
|
|
}
|
|
|
|
else
|
2022-12-02 12:35:59 +00:00
|
|
|
menuentry "@VTMENU_CHKSUM_SHA512_CALC" --class=checksum_sha512{
|
2021-10-24 10:52:09 +00:00
|
|
|
sha512sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
|
|
|
|
|
|
|
echo -e "\n\npress ENTER to exit ..."
|
|
|
|
read vtInputKey
|
|
|
|
}
|
|
|
|
fi
|
2021-10-19 09:42:32 +00:00
|
|
|
|
|
|
|
|
2022-12-02 12:35:59 +00:00
|
|
|
menuentry '@VTMENU_RETURN_PREVIOUS' --class=vtoyret VTOY_RET {
|
2021-10-19 09:42:32 +00:00
|
|
|
echo 'Return ...'
|
|
|
|
}
|