diff options
author | Lyndon Brown <jnqnfe@gmail.com> | 2020-05-04 16:12:45 +0100 |
---|---|---|
committer | Lyndon Brown <jnqnfe@gmail.com> | 2020-05-04 21:40:13 +0100 |
commit | d7883ec32b2bb907fce17fb759c08c5cd9851fc3 (patch) | |
tree | 94b2294140e7c902a33e0262aa6adf5a1d07b98e /scripts/build/source_debian | |
parent | 3f840aeeba982a858a881271a3bb48bca5b50dd8 (diff) | |
download | vyos-live-build-d7883ec32b2bb907fce17fb759c08c5cd9851fc3.tar.gz vyos-live-build-d7883ec32b2bb907fce17fb759c08c5cd9851fc3.zip |
config: improve BIOS/EFI bootloader selection handling
the design choice from when EFI support was introduced was to change
`--bootloader` to `--bootloaders`, with users specifying their selection
of BIOS and EFI bootloaders together. at this time there were not even any
decent validation checks being performed, and invalid combinations could
cause some chaos.
since then proper validation was put in place, including checking that
only a single instance of each of BIOS and EFI bootloaders exists in the
selection.
here we tweak things such that we stick with the same option, but we split
the selection up such that we store the BIOS and EFI selections separately
within the saved config file, and offer it up to scripts to help simplify
those scripts.
we must however retain support for splitting from the combined option,
both because we still use it in the combined option, and for backwards
compatibility with older saved configs.
Gbp-Dch: Short
Diffstat (limited to 'scripts/build/source_debian')
-rwxr-xr-x | scripts/build/source_debian | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/build/source_debian b/scripts/build/source_debian index 2eed78861..ade03add9 100755 --- a/scripts/build/source_debian +++ b/scripts/build/source_debian @@ -54,9 +54,12 @@ Chroot chroot "sh source-selection.sh" rm -f chroot/source-selection.sh mv chroot/source-selection.txt ./ -for BOOTLOADER in ${LB_BOOTLOADERS}; do - echo "${BOOTLOADER}" >> source-selection.txt -done +if [ -n "${LB_BOOTLOADER_BIOS}" ]; then + echo "${LB_BOOTLOADER_BIOS}" >> source-selection.txt +fi +if [ -n "${LB_BOOTLOADER_EFI}" ]; then + echo "${LB_BOOTLOADER_EFI}" >> source-selection.txt +fi echo "live-build" >> source-selection.txt |