summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorRoland Clobus <rclobus@rclobus.nl>2021-03-21 12:32:54 +0100
committerRoland Clobus <rclobus@rclobus.nl>2021-03-21 12:32:54 +0100
commit745b2be876b50b5033c7d2514facb5b71799c9ae (patch)
tree4ed7a6421c11d037f6f890560f66ea071f471a57 /functions
parent9524705c34811c56f35ea005791157e867845324 (diff)
downloadvyos-live-build-745b2be876b50b5033c7d2514facb5b71799c9ae.tar.gz
vyos-live-build-745b2be876b50b5033c7d2514facb5b71799c9ae.zip
Fixed handling of checksums in combination with the d-i installer.
1) lb config rejected multiple checksum types 2) When using the installer, cdrom-checker requires a md5 checksum file, use 'Check the integrity of the installation media' in the installer 3) The comments in the first lines of the checksum files caused cdrom-checker to fail the integrity of the image
Diffstat (limited to 'functions')
-rwxr-xr-xfunctions/configuration.sh24
1 files changed, 21 insertions, 3 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