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:09
Message-Id: 1581697401.5c55dd467a563623f16be27f670b5a3ddc79fb02.zerochaos@gentoo
1 commit: 5c55dd467a563623f16be27f670b5a3ddc79fb02
2 Author: Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 14 16:23:21 2020 +0000
4 Commit: Rick Farina <zerochaos <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 14 16:23:21 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=5c55dd46
7
8 verify support for blake2
9
10 Signed-off-by: Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo.org>
11
12 defaults/initrd.scripts | 21 +++++++++++++++++----
13 1 file changed, 17 insertions(+), 4 deletions(-)
14
15 diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
16 index 6c7d72b..3ea80ee 100644
17 --- a/defaults/initrd.scripts
18 +++ b/defaults/initrd.scripts
19 @@ -318,20 +318,33 @@ bootstrapCD() {
20 if [ "${VERIFY}" = '1' ]
21 then
22 cd "${CDROOT_PATH}"
23 - if [ -f isoroot_checksums ]
24 + if [ -r "isoroot_b2sums" ] && [ -x "$(command -v b2sum 2>&1)" ]
25 then
26 - good_msg "Verifying checksums, this may take some time ..."
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 + elif [ -r "isoroot_checksums" ]
38 + then
39 + good_msg "Verifying SHA512 checksums, this may take some time ..."
40 if ! run sha512sum -c isoroot_checksums
41 then
42 bad_msg "Some checksums failed, press any key to poweroff ..."
43 read -n1 -s
44 poweroff -f
45 else
46 - good_msg "Checksums all valid, continuing boot ..."
47 + good_msg "SHA512 checksums all valid, continuing boot ..."
48 fi
49 cd "${OLDPWD}"
50 else
51 - bad_msg "Verify enabled but no checksums file exists, skipping"
52 + bad_msg "Verify requested but no checksums file exists, press any key to skip ..."
53 + read -n1 -s
54 fi
55 fi
56 }