mirror of
https://github.com/pentoo/pentoo-overlay
synced 2025-12-18 22:39:05 +01:00
66 lines
1.7 KiB
Diff
66 lines
1.7 KiB
Diff
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 f6fd564..fd10e0d 100755
|
|
--- a/defaults/initrd.defaults
|
|
+++ b/defaults/initrd.defaults
|
|
@@ -68,6 +68,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 1cc9ff9..aaf92a2 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 19b9878..d2cdaa2 100644
|
|
--- a/defaults/linuxrc
|
|
+++ b/defaults/linuxrc
|
|
@@ -280,6 +280,9 @@ do
|
|
nounionfs)
|
|
USE_UNIONFS_NORMAL=0
|
|
;;
|
|
+ verify)
|
|
+ VERIFY=1
|
|
+ ;;
|
|
esac
|
|
done
|
|
|