From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 466BC1397EC for ; Thu, 20 Aug 2015 02:26:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 07A78142F3; Thu, 20 Aug 2015 02:26:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A249C142F3 for ; Thu, 20 Aug 2015 02:26:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7B1E93408DD for ; Thu, 20 Aug 2015 02:26:10 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CFB9D15B for ; Thu, 20 Aug 2015 02:26:07 +0000 (UTC) From: "Richard Farina" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Richard Farina" Message-ID: <1440037556.8d1b1ff68fc56f79739c02bbe5ebe9ef14933825.zerochaos@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: defaults/ X-VCS-Repository: proj/genkernel X-VCS-Files: defaults/busy-config defaults/initrd.defaults defaults/initrd.scripts defaults/linuxrc X-VCS-Directories: defaults/ X-VCS-Committer: zerochaos X-VCS-Committer-Name: Richard Farina X-VCS-Revision: 8d1b1ff68fc56f79739c02bbe5ebe9ef14933825 X-VCS-Branch: master Date: Thu, 20 Aug 2015 02:26:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 6de75d62-66d0-437f-9051-6947e03be04e X-Archives-Hash: 7cabcab4ec519113427b49782e36476d commit: 8d1b1ff68fc56f79739c02bbe5ebe9ef14933825 Author: Rick Farina (Zero_Chaos) gentoo org> AuthorDate: Thu Aug 20 02:25:56 2015 +0000 Commit: Richard Farina gentoo org> CommitDate: Thu Aug 20 02:25:56 2015 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=8d1b1ff6 add in the isoroot/cdroot verification patch from pentoo defaults/busy-config | 2 +- defaults/initrd.defaults | 1 + defaults/initrd.scripts | 16 ++++++++++++++++ defaults/linuxrc | 3 +++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/defaults/busy-config b/defaults/busy-config index b1188e9..aed797e 100644 --- a/defaults/busy-config +++ b/defaults/busy-config @@ -306,7 +306,7 @@ CONFIG_FEATURE_HUMAN_READABLE=y # # Common options for md5sum, sha1sum, sha256sum, sha512sum # -# CONFIG_FEATURE_MD5_SHA1_SUM_CHECK is not set +CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y # # Console Utilities diff --git a/defaults/initrd.defaults b/defaults/initrd.defaults index 5e8fdbe..a5eb3ba 100755 --- a/defaults/initrd.defaults +++ b/defaults/initrd.defaults @@ -67,6 +67,7 @@ CDROOT_PATH='/mnt/cdrom' # This is the file that the cdroot will be checked for as a # marker. It must exist RELATIVE to the cdroot. CDROOT_MARKER='/livecd' +VERIFY=0 # AUFS variables aufs=0 diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index a07a408..2612574 100644 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -233,6 +233,22 @@ bootstrapCD() { findmediamount "cdrom" "${SUBDIR}/${CDROOT_MARKER}" \ "REAL_ROOT" "${CDROOT_PATH}" ${DEVICES} + if [ $VERIFY = 1 ]; then + cd "${CDROOT_PATH}" + if [ -f isoroot_checksums ]; then + good_msg "Verifying checksums, this may take some time..." + if ! busybox sha512sum -c isoroot_checksums; then + bad_msg "Some checksums failed, press any key to poweroff..." + read -n1 -s + busybox poweroff -f + else + good_msg "Checksums all valid, continuing boot..." + fi + cd $OLDPWD + else + bad_msg "Verify enabled but no checksums file exists, skipping" + fi + fi } bootstrapKey() { diff --git a/defaults/linuxrc b/defaults/linuxrc index 46b2151..ebf26b5 100644 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -283,6 +283,9 @@ do nounionfs) USE_UNIONFS_NORMAL=0 ;; + verify) + VERIFY=1 + ;; esac done