summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLyndon Brown <jnqnfe@gmail.com>2020-03-26 05:21:28 +0000
committerRaphaƫl Hertzog <raphael@offensive-security.com>2020-04-23 09:59:56 +0200
commit1f1b156697154179cdc0b8d95452b2f22c67eb9f (patch)
treeaeb2df36e196389d8ff15392f6926e5f8322bf47
parent24658ce5428d5ea0acd22973d79b015ad871f6ee (diff)
downloadvyos-live-build-1f1b156697154179cdc0b8d95452b2f22c67eb9f.tar.gz
vyos-live-build-1f1b156697154179cdc0b8d95452b2f22c67eb9f.zip
grub2|loopback: move copying of files earlier
necessary for changes in followup commits. Gbp-Dch: Short
-rwxr-xr-xscripts/build/binary_loopback_cfg16
1 files changed, 7 insertions, 9 deletions
diff --git a/scripts/build/binary_loopback_cfg b/scripts/build/binary_loopback_cfg
index 1eccbd70f..113fd7be0 100755
--- a/scripts/build/binary_loopback_cfg
+++ b/scripts/build/binary_loopback_cfg
@@ -129,10 +129,15 @@ END
# User config replacement/additional files
_SOURCE_USER="config/bootloaders/grub-pc"
+# Copying templates
+mkdir -p binary/boot/grub
if [ -n "${LIVE_BUILD}" ]; then
- _SOURCE="${LIVE_BUILD}/share/bootloaders/grub-pc"
+ cp -a "${LIVE_BUILD}/share/bootloaders/grub-pc"/* binary/boot/grub/
else
- _SOURCE="/usr/share/live/build/bootloaders/grub-pc"
+ cp -a "/usr/share/live/build/bootloaders/grub-pc"/* binary/boot/grub/
+fi
+if [ -e "${_SOURCE_USER}" ]; then
+ cp -af "${_SOURCE_USER}"/* binary/boot/grub/
fi
case "${LB_INITRAMFS}" in
@@ -269,13 +274,6 @@ then
MEMTEST="$(Grub_memtest_menu_entry)$NL"
fi
-# Copying templates
-mkdir -p binary/boot/grub
-cp -a "${_SOURCE}"/* binary/boot/grub/
-if [ -e "${_SOURCE_USER}" ]; then
- cp -af "${_SOURCE_USER}"/* binary/boot/grub/
-fi
-
escape_for_sed() {
echo -n "$1" | perl -npe 's/\n/\\n/gm'
}