diff options
-rwxr-xr-x | functions/configuration.sh | 24 | ||||
-rwxr-xr-x | scripts/build/binary_checksums | 19 | ||||
-rwxr-xr-x | scripts/build/source_checksums | 19 |
3 files changed, 35 insertions, 27 deletions
diff --git a/functions/configuration.sh b/functions/configuration.sh index fac1d0958..c7d2dfc0f 100755 --- a/functions/configuration.sh +++ b/functions/configuration.sh @@ -352,6 +352,19 @@ Prepare_config () Echo_warning "A value of 'true' for option LB_DEBIAN_INSTALLER is deprecated, please use 'netinst' in future." fi + # cdrom-checker in d-i requires a md5 checksum file + if [ "${LB_DEBIAN_INSTALLER}" != "none" ] + then + if [ "${LB_CHECKSUMS}" = "none" ] + then + LB_CHECKSUMS="md5" + else + if ! In_list md5 ${LB_CHECKSUMS}; then + LB_CHECKSUMS=${LB_CHECKSUMS}" md5" + fi + fi + fi + LB_DEBIAN_INSTALLER_DISTRIBUTION="${LB_DEBIAN_INSTALLER_DISTRIBUTION:-${LB_DISTRIBUTION}}" LB_DEBIAN_INSTALLER_GUI="${LB_DEBIAN_INSTALLER_GUI:-true}" @@ -648,9 +661,14 @@ Validate_config_permitted_values () fi done - if ! In_list "${LB_CHECKSUMS}" md5 sha1 sha224 sha256 sha384 sha512 none; then - Echo_error "You have specified an invalid value for LB_CHECKSUMS (--checksums)." - exit 1 + local CHECKSUM + if [ "${LB_CHECKSUMS}" != "none" ]; then + for CHECKSUM in ${LB_CHECKSUMS}; do + if ! In_list "${CHECKSUM}" md5 sha1 sha224 sha256 sha384 sha512; then + Echo_error "You have specified an invalid value for LB_CHECKSUMS (--checksums): '%s'" "${CHECKSUM}" + exit 1 + fi + done fi if ! In_list "${LB_CHROOT_FILESYSTEM}" ext2 ext3 ext4 squashfs jffs2 none; then diff --git a/scripts/build/binary_checksums b/scripts/build/binary_checksums index 3d79aab91..75c6fe770 100755 --- a/scripts/build/binary_checksums +++ b/scripts/build/binary_checksums @@ -55,20 +55,15 @@ do \! -path './boot/grub/stage2_eltorito' \ \! -path './*SUMS' \ \! -path './*sum.txt' \ - -print0 | sort -z | xargs -0 ${CHECKSUM}sum > ../${CHECKSUMS} + \! -path './*sum.README' \ + -print0 | sort -z | xargs -0 ${CHECKSUM}sum > ${CHECKSUMS} -cat > ${CHECKSUMS} << EOF -## This file contains the list of ${CHECKSUM} checksums of all files on this -## medium. -## -## You can verify them automatically with the 'verify-checksums' boot parameter, -## or, manually with: '${CHECKSUM}sum -c ${CHECKSUMS}'. -## -## -EOF +cat > ${CHECKSUM}sum.README << EOF +The file ${CHECKSUMS} contains the ${CHECKSUM} checksums of all files on this medium. - cat ../${CHECKSUMS} >> ${CHECKSUMS} - rm -f ../${CHECKSUMS} +You can verify them automatically with the 'verify-checksums' boot parameter, +or, manually with: '${CHECKSUM}sum -c ${CHECKSUMS}'. +EOF cd "${OLDPWD}" done diff --git a/scripts/build/source_checksums b/scripts/build/source_checksums index fe289e396..db23aa867 100755 --- a/scripts/build/source_checksums +++ b/scripts/build/source_checksums @@ -59,20 +59,15 @@ do find . -type f \ \! -path './*SUMS' \ \! -path './*sum.txt' \ - -print0 | sort -z | xargs -0 ${CHECKSUM}sum > ../${CHECKSUMS} + \! -path './*sum.README' \ + -print0 | sort -z | xargs -0 ${CHECKSUM}sum > ${CHECKSUMS} -cat > ${CHECKSUMS} << EOF -## This file contains the list of ${CHECKSUM} checksums of all files on this -## medium. -## -## You can verify them automatically with the 'verify-checksums' boot parameter, -## or, manually with: '${CHECKSUM}sum -c ${CHECKSUMS}'. -## -## -EOF +cat > ${CHECKSUM}sum.README << EOF +The file ${CHECKSUMS} contains the ${CHECKSUM} checksums of all files on this medium. - cat ../${CHECKSUMS} >> ${CHECKSUMS} - rm -f ../${CHECKSUMS} +You can verify them automatically with the 'verify-checksums' boot parameter, +or, manually with: '${CHECKSUM}sum -c ${CHECKSUMS}'. +EOF cd "${OLDPWD}" done |