commit: 5c55dd467a563623f16be27f670b5a3ddc79fb02
Author: Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 14 16:23:21 2020 +0000
Commit: Rick Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Fri Feb 14 16:23:21 2020 +0000
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=5c55dd46
verify support for blake2
Signed-off-by: Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo.org>
defaults/initrd.scripts | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index 6c7d72b..3ea80ee 100644
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -318,20 +318,33 @@ bootstrapCD() {
if [ "${VERIFY}" = '1' ]
then
cd "${CDROOT_PATH}"
- if [ -f isoroot_checksums ]
+ if [ -r "isoroot_b2sums" ] && [ -x "$(command -v b2sum 2>&1)" ]
then
- good_msg "Verifying checksums, this may take some time
..."
+ good_msg "Verifying BLAKE2 checksums, this may take
some time ..."
+ if ! run b2sum -c isoroot_b2sums
+ then
+ bad_msg "Some checksums failed, press any key
to poweroff ..."
+ read -n1 -s
+ poweroff -f
+ else
+ good_msg "BLAKE2 checksums all valid,
continuing boot ..."
+ fi
+ cd "${OLDPWD}"
+ elif [ -r "isoroot_checksums" ]
+ then
+ good_msg "Verifying SHA512 checksums, this may take
some time ..."
if ! run sha512sum -c isoroot_checksums
then
bad_msg "Some checksums failed, press any key
to poweroff ..."
read -n1 -s
poweroff -f
else
- good_msg "Checksums all valid, continuing boot
..."
+ good_msg "SHA512 checksums all valid,
continuing boot ..."
fi
cd "${OLDPWD}"
else
- bad_msg "Verify enabled but no checksums file exists,
skipping"
+ bad_msg "Verify requested but no checksums file exists,
press any key to skip ..."
+ read -n1 -s
fi
fi
}