diff options
author | Lyndon Brown <jnqnfe@gmail.com> | 2020-03-28 10:26:07 +0000 |
---|---|---|
committer | Raphaƫl Hertzog <hertzog@debian.org> | 2020-04-23 15:16:26 +0200 |
commit | eb2eb9b51e93eeb6db7860cf61518c2c432e8f94 (patch) | |
tree | 3508e0518335c9209babb392aa3cdc314eb798ad /scripts/build | |
parent | 9ab7a100dadb91770ae26d167eab87ed88a7698b (diff) | |
download | vyos-live-build-eb2eb9b51e93eeb6db7860cf61518c2c432e8f94.tar.gz vyos-live-build-eb2eb9b51e93eeb6db7860cf61518c2c432e8f94.zip |
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
Diffstat (limited to 'scripts/build')
-rwxr-xr-x | scripts/build/installer_debian-installer | 38 |
1 files 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) |