summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
authorKiel Christofferson <kiel@endpoint.com>2013-06-20 11:24:46 -0400
committerKiel Christofferson <kiel@endpoint.com>2014-02-21 12:56:43 -0500
commita934c03e0671c6cb6b3cfeff31e42788ecdfdb51 (patch)
tree86e78a828a9de2c8c24d9a34950eea15e4e59f90 /scripts/build
parenteb336bb782632bea33dac6a8c93bca177de51a33 (diff)
downloadvyos-live-build-a934c03e0671c6cb6b3cfeff31e42788ecdfdb51.tar.gz
vyos-live-build-a934c03e0671c6cb6b3cfeff31e42788ecdfdb51.zip
Use LB_INITRAMFS case instead of assuming "live".
Diffstat (limited to 'scripts/build')
-rwxr-xr-xscripts/build/binary_syslinux26
1 files changed, 18 insertions, 8 deletions
diff --git a/scripts/build/binary_syslinux b/scripts/build/binary_syslinux
index 4c6bccd5d..fd1f4e54d 100755
--- a/scripts/build/binary_syslinux
+++ b/scripts/build/binary_syslinux
@@ -47,6 +47,16 @@ Create_lockfile .lock
Check_architectures amd64 i386
Check_crossarchitectures
+case "${LB_INITRAMFS}" in
+ casper)
+ _INITRAMFS="casper"
+ ;;
+
+ *)
+ _INITRAMFS="live"
+ ;;
+esac
+
# Assembling image specifics
case "${LIVE_IMAGE_TYPE}" in
iso*)
@@ -169,12 +179,12 @@ then
case "${_FLAVOURS}" in
1)
- mv binary/live/vmlinuz-* binary/live/vmlinuz
- mv binary/live/initrd.img-* binary/live/initrd.img
+ mv binary/${_INITRAMFS}/vmlinuz-* binary/${_INITRAMFS}/vmlinuz
+ mv binary/${_INITRAMFS}/initrd.img-* binary/${_INITRAMFS}/initrd.img
sed -e "s|@FLAVOUR@|${LB_LINUX_FLAVOURS}|g" \
- -e "s|@LINUX@|/live/vmlinuz|g" \
- -e "s|@INITRD@|/live/initrd.img|g" \
+ -e "s|@LINUX@|/${_INITRAMFS}/vmlinuz|g" \
+ -e "s|@INITRD@|/${_INITRAMFS}/initrd.img|g" \
"${_TARGET}/live.cfg.in" >> "${_TARGET}/live.cfg"
rm -f "${_TARGET}/live.cfg.in"
@@ -187,8 +197,8 @@ then
do
_NUMBER="$((${_NUMBER} + 1))"
- mv binary/live/vmlinuz-*-${_FLAVOUR} binary/live/vmlinuz${_NUMBER}
- mv binary/live/initrd.img-*-${_FLAVOUR} binary/live/initrd${_NUMBER}.img
+ mv binary/${_INITRAMFS}/vmlinuz-*-${_FLAVOUR} binary/${_INITRAMFS}/vmlinuz${_NUMBER}
+ mv binary/${_INITRAMFS}/initrd.img-*-${_FLAVOUR} binary/${_INITRAMFS}/initrd${_NUMBER}.img
if [ "${_NUMBER}" -gt 1 ]
then
@@ -199,8 +209,8 @@ then
fi
sed -i -e "s|@FLAVOUR@|${_FLAVOUR}|g" \
- -e "s|@LINUX@|/live/vmlinuz${_NUMBER}|g" \
- -e "s|@INITRD@|/live/initrd${_NUMBER}.img|g" \
+ -e "s|@LINUX@|/${_INITRAMFS}/vmlinuz${_NUMBER}|g" \
+ -e "s|@INITRD@|/${_INITRAMFS}/initrd${_NUMBER}.img|g" \
"${_TARGET}/live.cfg"
done