From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter =?utf-8?q?M=C3=BCller?= To: development@lists.ipfire.org Subject: [PATCH 3/3] backupiso: Change checksum algorithm to BLAKE2 Date: Fri, 08 Apr 2022 15:11:15 +0000 Message-ID: <725ba25a-94f5-f8fe-f9cb-a26fa7d48373@ipfire.org> In-Reply-To: <814ae2bf-c453-ce55-74eb-e2fb11b5900e@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5936462570927092865==" List-Id: --===============5936462570927092865== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Reported-by: Arne Fitzenreiter Signed-off-by: Peter Müller --- src/scripts/backupiso | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/scripts/backupiso b/src/scripts/backupiso index fe5376741..ef017e3be 100644 --- a/src/scripts/backupiso +++ b/src/scripts/backupiso @@ -80,30 +80,30 @@ then wget --quiet -c ${URL}${ISO} fi -echo "Fetching ${URL}${ISO}.md5" -wget --quiet -O ${ISO}.md5 ${URL}${ISO}.md5 +echo "Fetching ${URL}${ISO}.b2" +wget --quiet -O ${ISO}.b2 ${URL}${ISO}.b2 -echo "Checking md5 of ${ISO}" -md5sum --status -c ${ISO}.md5 +echo "Checking BLAKE2 checksum of ${ISO}" +b2sum --status -c ${ISO}.b2 if [ $? -eq 0 ] || [ $? -eq 24 ] then - echo "md5 is OK" + echo "BLAKE2 checksum is OK" else - echo "md5 mismatch" + echo "BLAKE2 checksum mismatch" echo "Fetching again ${URL}${ISO}" wget --quiet -O ${ISO} ${URL}${ISO} - echo "Checking again md5 of ${ISO}" - md5sum --status -c ${ISO}.md5 + echo "Checking BLAKE2 checksum of ${ISO} again" + b2sum --status -c ${ISO}.b2 if [ $? -eq 0 ] || [ $? -eq 24 ] then - echo "md5 is OK" + echo "BLAKE2 checksum is OK" else - echo "md5 mismatch" - echo "aborting backup because md5 mismatch" + echo "BLAKE2 checksum mismatch" + echo "aborting backup because BLAKE2 checksum mismatch" exit 1 fi fi -rm ${ISO}.md5 +rm ${ISO}.b2 echo "Remastering iso" mkdir -p backupiso.tmp.${TS} -- 2.34.1 --===============5936462570927092865==--