Gentoo Archives: gentoo-commits

From: Rick Farina <zerochaos@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/genkernel:master commit in: defaults/
Date: Fri, 14 Feb 2020 16:35:08
Message-Id: 1581698099.ee2d1bfe83add4441909e999fff06694c6f3c433.zerochaos@gentoo
1 commit: ee2d1bfe83add4441909e999fff06694c6f3c433
2 Author: Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 14 16:34:59 2020 +0000
4 Commit: Rick Farina <zerochaos <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 14 16:34:59 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=ee2d1bfe
7
8 dedupe verify the best we can
9
10 Signed-off-by: Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo.org>
11
12 defaults/initrd.scripts | 26 +++++++++++++-------------
13 1 file changed, 13 insertions(+), 13 deletions(-)
14
15 diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
16 index 3ea80ee..7c115cb 100644
17 --- a/defaults/initrd.scripts
18 +++ b/defaults/initrd.scripts
19 @@ -318,28 +318,28 @@ bootstrapCD() {
20 if [ "${VERIFY}" = '1' ]
21 then
22 cd "${CDROOT_PATH}"
23 + checkfile=""
24 + checker=""
25 if [ -r "isoroot_b2sums" ] && [ -x "$(command -v b2sum 2>&1)" ]
26 then
27 - good_msg "Verifying BLAKE2 checksums, this may take some time ..."
28 - if ! run b2sum -c isoroot_b2sums
29 - then
30 - bad_msg "Some checksums failed, press any key to poweroff ..."
31 - read -n1 -s
32 - poweroff -f
33 - else
34 - good_msg "BLAKE2 checksums all valid, continuing boot ..."
35 - fi
36 - cd "${OLDPWD}"
37 + checkfile="isoroot_b2sums"
38 + checker="b2sum"
39 elif [ -r "isoroot_checksums" ]
40 then
41 - good_msg "Verifying SHA512 checksums, this may take some time ..."
42 - if ! run sha512sum -c isoroot_checksums
43 + checkfile="isoroot_checksums"
44 + checker="sha512sum"
45 + fi
46 +
47 + if [ -n "${checkfile}" ]
48 + then
49 + good_msg "Verifying ${checkfile}, this may take some time ..."
50 + if ! run "${checker}" -c "${checkfile}"
51 then
52 bad_msg "Some checksums failed, press any key to poweroff ..."
53 read -n1 -s
54 poweroff -f
55 else
56 - good_msg "SHA512 checksums all valid, continuing boot ..."
57 + good_msg "${checkfile} all valid, continuing boot ..."
58 fi
59 cd "${OLDPWD}"
60 else