diff options
author | Lyndon Brown <jnqnfe@gmail.com> | 2020-03-28 05:13:11 +0000 |
---|---|---|
committer | Raphaƫl Hertzog <hertzog@debian.org> | 2020-04-23 14:51:09 +0200 |
commit | 39e4d3e3cbcc8d37700cfe46a95f669b4d9479ea (patch) | |
tree | e30a4295f421d6386d16a310c58659a0058f93f7 /functions/defaults.sh | |
parent | cede584a5cece40511c94fcec31569218d00419c (diff) | |
download | vyos-live-build-39e4d3e3cbcc8d37700cfe46a95f669b4d9479ea.tar.gz vyos-live-build-39e4d3e3cbcc8d37700cfe46a95f669b4d9479ea.zip |
--binary-images can support only a single type
whilst some parts of the codebase were set up to work with multiple types
specified, others did not work with it and would not necessarily be easy
to adjust. this thus makes some tweaks to adjust things accordingly.
- option renamed to singular form (maintaining backwards compatibility)
- a validation check has been added
- unnecessary glob style type references fixed
- checks with In_list changed to a direct singular comparison
- typo of type "netboot" written as just "net" fixed (though unreachable
so of no consequence; really the code could be removed but it's trivial)
Gbp-Dch: Short
Diffstat (limited to 'functions/defaults.sh')
-rwxr-xr-x | functions/defaults.sh | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh index 73b90bed7..c52acb80a 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -374,7 +374,7 @@ Set_config_defaults () case "${LB_ARCHITECTURES}" in amd64|i386) case "${LIVE_IMAGE_TYPE}" in - hdd*|netboot) + hdd|netboot) LB_BOOTLOADERS="syslinux" ;; *) @@ -451,11 +451,11 @@ Set_config_defaults () if [ -n "${LB_DEBIAN_INSTALLER_PRESEEDFILE}" ] then case "${LIVE_IMAGE_TYPE}" in - iso*) + iso|iso-hybrid) _LB_BOOTAPPEND_PRESEED="file=/cdrom/install/${LB_DEBIAN_INSTALLER_PRESEEDFILE}" ;; - hdd*) + hdd) _LB_BOOTAPPEND_PRESEED="file=/hd-media/install/${LB_DEBIAN_INSTALLER_PRESEEDFILE}" ;; @@ -470,6 +470,9 @@ Set_config_defaults () ;; esac ;; + + tar) + ;; esac fi @@ -618,8 +621,13 @@ Check_config_defaults () esac fi + if ! In_list "${LIVE_IMAGE_TYPE}" iso iso-hybrid hdd tar netboot; then + Echo_error "You have specified an invalid value for --binary-image." + exit 1 + fi + case "${LIVE_IMAGE_TYPE}" in - hdd*) + hdd) case "${LB_FIRST_BOOTLOADER}" in grub-legacy) Echo_error "You have selected a combination of bootloader and image type that is currently not supported by live-build. Please use either another bootloader or a different image type." |