summaryrefslogtreecommitdiff
path: root/scripts/build/binary_grub-legacy
diff options
context:
space:
mode:
authorLyndon Brown <jnqnfe@gmail.com>2020-03-28 08:17:28 +0000
committerRaphaƫl Hertzog <hertzog@debian.org>2020-04-23 15:08:07 +0200
commit554a8d11088181e666a04558230e94b19f32f2d6 (patch)
tree2130533ea8bdee71bd24aef01cfc351cadb4a23a /scripts/build/binary_grub-legacy
parent9b70092f259ae3ff309b31178b845ce2f92f2d76 (diff)
downloadvyos-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 'scripts/build/binary_grub-legacy')
-rwxr-xr-xscripts/build/binary_grub-legacy27
1 files changed, 10 insertions, 17 deletions
diff --git a/scripts/build/binary_grub-legacy b/scripts/build/binary_grub-legacy
index 39e59d437..7891bba65 100755
--- a/scripts/build/binary_grub-legacy
+++ b/scripts/build/binary_grub-legacy
@@ -21,6 +21,10 @@ USAGE="${PROGRAM} [--force]"
# Processing arguments and configuration files
Init_config_data "${@}"
+if In_list "${LIVE_IMAGE_TYPE}" hdd netboot; then
+ exit 0
+fi
+
Check_First_Bootloader_Role "grub-legacy"
Echo_message "Begin installing grub-legacy..."
@@ -103,27 +107,16 @@ case "${LB_INITRAMFS}" in
esac
# Setting destination directory
-case "${LIVE_IMAGE_TYPE}" in
- iso|iso-hybrid|tar)
- case "${LB_INITRAMFS}" in
- live-boot)
- DESTDIR_LIVE="binary/live"
- ;;
-
- *)
- DESTDIR_LIVE="binary/boot"
- ;;
- esac
-
- DESTDIR_INSTALL="binary/install"
+case "${LB_INITRAMFS}" in
+ live-boot)
+ DESTDIR_LIVE="binary/live"
;;
- hdd|netboot)
- Echo_warning "Bootloader in this image type not yet supported by live-build."
- Echo_error "This would produce a not bootable image, aborting (FIXME)."
- exit 1
+ *)
+ DESTDIR_LIVE="binary/boot"
;;
esac
+DESTDIR_INSTALL="binary/install"
# Creating directory
mkdir -p "${DESTDIR_LIVE}"