aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 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