summaryrefslogtreecommitdiff
path: root/scripts/build/binary_grub2
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-04-29 07:52:56 +0200
committerDaniel Baumann <mail@daniel-baumann.ch>2015-04-29 07:52:56 +0200
commit7e633e77f24b6f5ab9a8b22d7d6cf6521454d638 (patch)
treec4a11950037f0e66cd79e00761302f8cc8acfb76 /scripts/build/binary_grub2
parent7f6b1d71f8f6c66a78ba88f19cf12c035476f4ef (diff)
downloadvyos-live-build-7e633e77f24b6f5ab9a8b22d7d6cf6521454d638.tar.gz
vyos-live-build-7e633e77f24b6f5ab9a8b22d7d6cf6521454d638.zip
Moving grub and grub2 templates into shared bootloader config directory.
Diffstat (limited to 'scripts/build/binary_grub2')
-rwxr-xr-xscripts/build/binary_grub216
1 files changed, 15 insertions, 1 deletions
diff --git a/scripts/build/binary_grub2 b/scripts/build/binary_grub2
index 61f5dc6e0..926df668e 100755
--- a/scripts/build/binary_grub2
+++ b/scripts/build/binary_grub2
@@ -91,6 +91,20 @@ Grub_install_entry ()
LINUX_INSTALL="${LINUX_INSTALL}\n}"
}
+if [ -e "config/bootloaders/grub2" ]
+then
+ # Internal local copy
+ _SOURCE="config/bootloaders/grub2"
+else
+ # Internal system copy
+ if [ -n "${LIVE_BUILD}" ]
+ then
+ _SOURCE="${LIVE_BUILD}/share/bootloaders/grub2"
+ else
+ _SOURCE="/usr/share/live/build/bootloaders/grub2"
+ fi
+fi
+
case "${LB_INITRAMFS}" in
casper)
INITFS="casper"
@@ -211,7 +225,7 @@ fi
# Copying templates
mkdir -p binary/boot/grub/i386-pc
-cp -r "${TEMPLATES}"/* binary/boot/grub
+cp -r "${_SOURCE}"/* binary/boot/grub
case ${LIVE_IMAGE_TYPE} in
iso*)