From 02a9e7166785d11aa030383fdf3ec720bd73b69e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 12 Nov 2007 23:00:48 +0100 Subject: Adding option to disable md5sum generation. --- functions/defaults.sh | 3 +++ helpers/lh_binary_md5sum | 5 +++++ helpers/lh_config | 12 +++++++++++- helpers/lh_source_md5sum | 5 +++++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/functions/defaults.sh b/functions/defaults.sh index 6c76ac7..ed54ca9 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -498,6 +498,9 @@ Set_defaults () esac fi + # Setting checksums + LH_CHECKSUMS="${LH_CHECKSUMS:-enabled}" + # Setting chroot option LH_CHROOT_BUILD="${LH_CHROOT_BUILD:-enabled}" diff --git a/helpers/lh_binary_md5sum b/helpers/lh_binary_md5sum index 9b0d81d..0c614bf 100755 --- a/helpers/lh_binary_md5sum +++ b/helpers/lh_binary_md5sum @@ -33,6 +33,11 @@ Read_conffile config/source Read_conffile "${LH_CONFIG}" Set_defaults +if [ "${LH_CHECKSUMS}" != "enabled" ] +then + exit 0 +fi + Echo_message "Begin creating binary md5sum.txt..." # Requiring stage file diff --git a/helpers/lh_config b/helpers/lh_config index 05e5cb0..255f59d 100755 --- a/helpers/lh_config +++ b/helpers/lh_config @@ -42,6 +42,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\ \t [--cache-indices enabled|disabled]\n\ \t [--cache-packages enabled|disabled]\n\ \t [--cache-stages STAGE|\"STAGES\"]\n\ +\t [--checksums enabled|disabled]\n\ \t [--chroot-build enabled|disabled]\n\ \t [--chroot-filesystem ext2|ext3|squashfs|plain]\n\ \t [-c|--conffile FILE]\n\ @@ -109,7 +110,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\ Local_arguments () { - ARGUMENTS="$(getopt --longoptions apt:,apt-ftp-proxy:,apt-http-proxy:,apt-pdiffs:,apt-pipeline:,apt-recommends:,apt-secure:,bootstrap:,cache:,cache-indices:,cache-packages:,cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,genisoimage:,initramfs:,fdisk:,losetup:,mode:,root-command:,use-fakeroot:,tasksel:,includes:,templates:,architecture:,bootstrap-config:,bootstrap-flavour:,bootstrap-keyring:,distribution:,mirror-bootstrap:,mirror-bootstrap-security:,mirror-binary:,mirror-binary-security:,sections:,chroot-filesystem:,union-filesystem:,exposed-root:,hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,binary-images:,binary-indices:,bootappend-install:,bootappend-live:,bootloader:,chroot-build:,debian-installer:,debian-installer-daily:,encryption:,grub-splash:,hostname:,iso-application:,iso-preparer:,iso-publisher:,iso-volume:,memtest:,net-root-filesystem:,net-root-mountoptions:,net-root-path:,net-root-server:,net-cow-filesystem:,net-cow-mountoptions:,net-cow-path:,net-cow-server:,syslinux-splash:,syslinux-timeout:,syslinux-menu:,username:,source:,source-images:,breakpoints,conffile:,debug,force,help,quiet,usage,verbose,version --name=${PROGRAM} --options a:f:d:m:l:k:p:b:e:s:c:huv --shell sh -- "${@}")" + ARGUMENTS="$(getopt --longoptions apt:,apt-ftp-proxy:,apt-http-proxy:,apt-pdiffs:,apt-pipeline:,apt-recommends:,apt-secure:,bootstrap:,cache:,cache-indices:,cache-packages:,cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,genisoimage:,initramfs:,fdisk:,losetup:,mode:,root-command:,use-fakeroot:,tasksel:,includes:,templates:,architecture:,bootstrap-config:,bootstrap-flavour:,bootstrap-keyring:,distribution:,mirror-bootstrap:,mirror-bootstrap-security:,mirror-binary:,mirror-binary-security:,sections:,chroot-filesystem:,union-filesystem:,exposed-root:,hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,binary-images:,binary-indices:,bootappend-install:,bootappend-live:,bootloader:,checksums:,chroot-build:,debian-installer:,debian-installer-daily:,encryption:,grub-splash:,hostname:,iso-application:,iso-preparer:,iso-publisher:,iso-volume:,memtest:,net-root-filesystem:,net-root-mountoptions:,net-root-path:,net-root-server:,net-cow-filesystem:,net-cow-mountoptions:,net-cow-path:,net-cow-server:,syslinux-splash:,syslinux-timeout:,syslinux-menu:,username:,source:,source-images:,breakpoints,conffile:,debug,force,help,quiet,usage,verbose,version --name=${PROGRAM} --options a:f:d:m:l:k:p:b:e:s:c:huv --shell sh -- "${@}")" if [ "${?}" != "0" ] then @@ -426,6 +427,11 @@ Local_arguments () shift 2 ;; + --checksums) + LH_CHECKSUMS="${2}" + shift 2 + ;; + --chroot-build) LH_CHROOT_BUILD="${2}" shift 2 @@ -919,6 +925,10 @@ LH_BOOTAPPEND_INSTALL="${LH_BOOTAPPEND_INSTALL}" # (Default: ${LH_BOOTLOADER}) LH_BOOTLOADER="${LH_BOOTLOADER}" +# \$LH_CHECKSUMS: set checksums +# (Default: ${LH_CHECKSUMS}) +LH_CHECKSUMS="${LH_CHECKSUMS}" + # \${LH_CHROOT_BUILD: control if we build binary images chrooted # (Default: ${LH_CHROOT_BUILD}) # DO NEVER, *NEVER*, *N*E*V*E*R* SET THIS OPTION to disabled. diff --git a/helpers/lh_source_md5sum b/helpers/lh_source_md5sum index bf7f378..ccde309 100755 --- a/helpers/lh_source_md5sum +++ b/helpers/lh_source_md5sum @@ -38,6 +38,11 @@ then exit 0 fi +if [ "${LH_CHECKSUMS}" != "enabled" ] +then + exit 0 +fi + Echo_message "Begin creating source md5sum.txt..." # Requiring stage file -- cgit v1.0