summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
authorLyndon Brown <jnqnfe@gmail.com>2020-03-28 10:26:07 +0000
committerRaphaƫl Hertzog <hertzog@debian.org>2020-04-23 15:16:26 +0200
commiteb2eb9b51e93eeb6db7860cf61518c2c432e8f94 (patch)
tree3508e0518335c9209babb392aa3cdc314eb798ad /scripts/build
parent9ab7a100dadb91770ae26d167eab87ed88a7698b (diff)
downloadvyos-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-xscripts/build/installer_debian-installer38
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)