aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Farina (Zero_Chaos) <zerochaos@gentoo.org>2015-08-19 22:25:56 -0400
committerRick Farina (Zero_Chaos) <zerochaos@gentoo.org>2015-08-19 22:25:56 -0400
commit8d1b1ff68fc56f79739c02bbe5ebe9ef14933825 (patch)
treedc77110fd2b41426aff0d8d249682f6669949423 /defaults
parentbump to 3.4.52.1 to fix distclean commit and ensure clean tags (diff)
downloadgenkernel-8d1b1ff68fc56f79739c02bbe5ebe9ef14933825.tar.gz
genkernel-8d1b1ff68fc56f79739c02bbe5ebe9ef14933825.tar.bz2
genkernel-8d1b1ff68fc56f79739c02bbe5ebe9ef14933825.zip
add in the isoroot/cdroot verification patch from pentoo
Diffstat (limited to 'defaults')
-rw-r--r--defaults/busy-config2
-rwxr-xr-xdefaults/initrd.defaults1
-rw-r--r--defaults/initrd.scripts16
-rw-r--r--defaults/linuxrc3
4 files changed, 21 insertions, 1 deletions
diff --git a/defaults/busy-config b/defaults/busy-config
index b1188e91..aed797e4 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 5e8fdbe9..a5eb3ba4 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 a07a4086..26125743 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 46b2151c..ebf26b53 100644
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -283,6 +283,9 @@ do
nounionfs)
USE_UNIONFS_NORMAL=0
;;
+ verify)
+ VERIFY=1
+ ;;
esac
done