diff options
author | Lyndon Brown <jnqnfe@gmail.com> | 2020-03-28 08:17:28 +0000 |
---|---|---|
committer | Raphaƫl Hertzog <hertzog@debian.org> | 2020-04-23 15:08:07 +0200 |
commit | 554a8d11088181e666a04558230e94b19f32f2d6 (patch) | |
tree | 2130533ea8bdee71bd24aef01cfc351cadb4a23a /functions/configuration.sh | |
parent | 9b70092f259ae3ff309b31178b845ce2f92f2d76 (diff) | |
download | vyos-live-build-554a8d11088181e666a04558230e94b19f32f2d6.tar.gz vyos-live-build-554a8d11088181e666a04558230e94b19f32f2d6.zip |
tidy up grub bootloader compatibility checking
- add a validation check where an error will be printed
- replace the check done in the grub scripts with one that simple exits
if executed bypassing the validation check
Gbp-Dch: Short
Diffstat (limited to 'functions/configuration.sh')
-rwxr-xr-x | functions/configuration.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/functions/configuration.sh b/functions/configuration.sh index 5826ab2c3..be12f2173 100755 --- a/functions/configuration.sh +++ b/functions/configuration.sh @@ -617,6 +617,13 @@ Validate_config () fi fi + if In_list "grub-pc" ${LB_BOOTLOADERS} || In_list "grub-efi" ${LB_BOOTLOADERS} || In_list "grub-legacy" ${LB_BOOTLOADERS}; then + if In_list "${LIVE_IMAGE_TYPE}" hdd netboot; then + Echo_error "You have selected an invalid combination of bootloaders and live image type; the grub-* bootloaders are not compatible with hdd and netboot types." + exit 1 + fi + 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 |