diff options
author | Rick Farina (Zero_Chaos) <zerochaos@gentoo.org> | 2020-02-14 11:34:59 -0500 |
---|---|---|
committer | Rick Farina (Zero_Chaos) <zerochaos@gentoo.org> | 2020-02-14 11:34:59 -0500 |
commit | ee2d1bfe83add4441909e999fff06694c6f3c433 (patch) | |
tree | bae467a3b1af4eed05c998c737d224b6b63edc4c | |
parent | verify support for blake2 (diff) | |
download | genkernel-ee2d1bfe.tar.gz genkernel-ee2d1bfe.tar.bz2 genkernel-ee2d1bfe.zip |
dedupe verify the best we can
Signed-off-by: Rick Farina (Zero_Chaos) <zerochaos@gentoo.org>
-rw-r--r-- | defaults/initrd.scripts | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 3ea80eee..7c115cb7 100644 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -318,28 +318,28 @@ bootstrapCD() { if [ "${VERIFY}" = '1' ] then cd "${CDROOT_PATH}" + checkfile="" + checker="" if [ -r "isoroot_b2sums" ] && [ -x "$(command -v b2sum 2>&1)" ] then - 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}" + checkfile="isoroot_b2sums" + checker="b2sum" elif [ -r "isoroot_checksums" ] then - good_msg "Verifying SHA512 checksums, this may take some time ..." - if ! run sha512sum -c isoroot_checksums + checkfile="isoroot_checksums" + checker="sha512sum" + fi + + if [ -n "${checkfile}" ] + then + good_msg "Verifying ${checkfile}, this may take some time ..." + if ! run "${checker}" -c "${checkfile}" then bad_msg "Some checksums failed, press any key to poweroff ..." read -n1 -s poweroff -f else - good_msg "SHA512 checksums all valid, continuing boot ..." + good_msg "${checkfile} all valid, continuing boot ..." fi cd "${OLDPWD}" else |