From 554a8d11088181e666a04558230e94b19f32f2d6 Mon Sep 17 00:00:00 2001 From: Lyndon Brown Date: Sat, 28 Mar 2020 08:17:28 +0000 Subject: 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 --- functions/configuration.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'functions') 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 -- cgit v1.2.3