summaryrefslogtreecommitdiff
path: root/scripts/build/lb_binary_syslinux
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2011-02-14 16:20:00 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:20:43 +0100
commitc746513893742e75578d44773612de8408d118de (patch)
tree146283e6d5b898014a4ca37678e3aa634c0d84f1 /scripts/build/lb_binary_syslinux
parentced01e41a129e6d54e8462a7b3e932da1ef2f9e9 (diff)
downloadvyos-live-build-c746513893742e75578d44773612de8408d118de.tar.gz
vyos-live-build-c746513893742e75578d44773612de8408d118de.zip
Making sure to correctly deference syslinux theme files when building chrooted.
Diffstat (limited to 'scripts/build/lb_binary_syslinux')
-rwxr-xr-xscripts/build/lb_binary_syslinux16
1 files changed, 13 insertions, 3 deletions
diff --git a/scripts/build/lb_binary_syslinux b/scripts/build/lb_binary_syslinux
index b6b2c0aee..e6f137872 100755
--- a/scripts/build/lb_binary_syslinux
+++ b/scripts/build/lb_binary_syslinux
@@ -58,8 +58,6 @@ case "${LB_BUILD_WITH_CHROOT}" in
# Installing depends
Install_package
-
- _PREFIX="chroot"
;;
esac
@@ -83,7 +81,19 @@ esac
# Copying files
mkdir -p ${_SUFFIX}
-cp -aL ${_PREFIX}/usr/share/syslinux/themes/${LB_SYSLINUX_THEME}/${_BOOTLOADER}-live/* ${_SUFFIX}
+
+case "${LB_BUILD_WITH_CHROOT}" in
+ true)
+ # Copy in two steps since the theme can have absolute symlinks and would therefore not be dereferenced correctly
+ Chroot chroot "cp -aL /usr/share/syslinux/themes/${LB_SYSLINUX_THEME}/${_BOOTLOADER}-live /root/tmp"
+ mv chroot/root/tmp/* ${_SUFFIX}
+ rmdir chroot/root/tmp
+ ;;
+
+ false)
+ cp -aL /usr/share/syslinux/themes/${LB_SYSLINUX_THEME}/${_BOOTLOADER}-live/* ${_SUFFIX}
+ ;;
+esac
# Configuring files
if [ -e ${_SUFFIX}/live.cfg ]