From eb2eb9b51e93eeb6db7860cf61518c2c432e8f94 Mon Sep 17 00:00:00 2001 From: Lyndon Brown Date: Sat, 28 Mar 2020 10:26:07 +0000 Subject: installer: rework validation check for installer type (and move the wget options setting down where it should be while at it) the value of LB_DEBIAN_INSTALLER is now properly checked in the main validation routine, so we can just directly exit here as a simple safety check should validation be bypassed. Gbp-Dch: Short --- scripts/build/installer_debian-installer | 38 +++++++++++++------------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/scripts/build/installer_debian-installer b/scripts/build/installer_debian-installer index e91c65ad2..1488ace79 100755 --- a/scripts/build/installer_debian-installer +++ b/scripts/build/installer_debian-installer @@ -21,31 +21,13 @@ USAGE="${PROGRAM} [--force]" # Processing arguments and configuration files Init_config_data "${@}" -if [ "${_DEBUG}" = "true" ] -then - WGET_OPTIONS="${WGET_OPTIONS} --verbose" -elif [ "${_QUIET}" = "true" ] -then - WGET_OPTIONS="${WGET_OPTIONS} --quiet" -else - WGET_OPTIONS="${WGET_OPTIONS} --no-verbose" +if ! In_list "${LB_DEBIAN_INSTALLER}" cdrom netinst netboot businesscard live; then + if [ "${LB_DEBIAN_INSTALLER}" = "none" ]; then + Echo_message "No installer wanted, skipping..." + fi + exit 0 fi -# Check d-i configuration -case "${LB_DEBIAN_INSTALLER}" in - cdrom|netinst|netboot|businesscard|live) - ;; - - none) - exit 0 - ;; - - *) - Echo_error "debian-installer flavour %s not supported." "${LB_DEBIAN_INSTALLER}" - exit 1 - ;; -esac - Echo_message "Begin installing debian-installer..." # Requiring stage file @@ -67,6 +49,16 @@ Restore_package_cache binary # Installing depends Install_package +if [ "${_DEBUG}" = "true" ] +then + WGET_OPTIONS="${WGET_OPTIONS} --verbose" +elif [ "${_QUIET}" = "true" ] +then + WGET_OPTIONS="${WGET_OPTIONS} --quiet" +else + WGET_OPTIONS="${WGET_OPTIONS} --no-verbose" +fi + # Setting destination directory case "${LIVE_IMAGE_TYPE}" in netboot) -- cgit v1.2.3