summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2013-01-19 18:04:52 +0100
committerDaniel Baumann <daniel@debian.org>2013-01-19 18:04:52 +0100
commit715adcfc8eae4a212c723b3b38d4c0347eeeb954 (patch)
tree0e1115823d475bb2dae21a349ffbc20ab503586d /scripts/build
parent9ec95b51a7ddcf02df94e7d81c488df9b7674398 (diff)
downloadvyos-live-build-715adcfc8eae4a212c723b3b38d4c0347eeeb954.tar.gz
vyos-live-build-715adcfc8eae4a212c723b3b38d4c0347eeeb954.zip
Falling back to use genisoimage when building squeeze iso-hybrid images.
Diffstat (limited to 'scripts/build')
-rwxr-xr-xscripts/build/binary_iso65
1 files changed, 54 insertions, 11 deletions
diff --git a/scripts/build/binary_iso b/scripts/build/binary_iso
index eb5b505d8..d804d7222 100755
--- a/scripts/build/binary_iso
+++ b/scripts/build/binary_iso
@@ -53,12 +53,25 @@ Check_lockfile .lock
Create_lockfile .lock
# Checking depends
-Check_package chroot/usr/bin/xorriso xorriso
+case "${LB_PARENT_DISTRIBUTION}" in
+ squeeze)
+ Check_package chroot/usr/bin/genisoimage genisoimage
+
+ if [ "${LB_BINARY_IMAGES}" = "iso-hybrid" ]
+ then
+ Check_package chroot/usr/bin/isohybrid syslinux
+ fi
+ ;;
-if [ "${LB_BINARY_IMAGES}" = "iso-hybrid" ]
-then
- Check_package chroot/usr/lib/syslinux/isohdpfx.bin syslinux-common
-fi
+ *)
+ Check_package chroot/usr/bin/xorriso xorriso
+
+ if [ "${LB_BINARY_IMAGES}" = "iso-hybrid" ]
+ then
+ Check_package chroot/usr/lib/syslinux/isohdpfx.bin syslinux-common
+ fi
+ ;;
+esac
# Restoring cache
Restore_cache cache/packages.binary
@@ -73,13 +86,20 @@ then
fi
# Handle xorriso generic options
-XORRISO_OPTIONS="-as mkisofs -r -J -joliet-long -l -cache-inodes"
+XORRISO_OPTIONS="-r -J -joliet-long -l -cache-inodes"
# Handle xorriso live-build specific options
-if [ "${LB_BINARY_IMAGES}" = "iso-hybrid" ]
-then
- XORRISO_OPTIONS="${XORRISO_OPTIONS} -isohybrid-mbr /usr/lib/syslinux/isohdpfx.bin -partition_offset 16"
-fi
+case "${LB_PARENT_DISTRIBUTION}" in
+ squeeze)
+ ;;
+
+ *)
+ if [ "${LB_BINARY_IMAGES}" = "iso-hybrid" ]
+ then
+ XORRISO_OPTIONS="${XORRISO_OPTIONS} -isohybrid-mbr /usr/lib/syslinux/isohdpfx.bin -partition_offset 16"
+ fi
+ ;;
+esac
if [ "${_QUIET}" = "true" ]
then
@@ -197,11 +217,34 @@ else
echo "#!/bin/sh" > binary.sh
fi
+case "${LB_PARENT_DISTRIBUTION}" in
+ squeeze)
+
+cat >> binary.sh << EOF
+genisoimage ${XORRISO_OPTIONS} -o ${IMAGE} binary
+EOF
+
+ if [ "${LB_BINARY_IMAGES}" = "iso-hybrid" ]
+ then
+
cat >> binary.sh << EOF
-xorriso ${XORRISO_OPTIONS} -o ${IMAGE} binary
+isohybrid ${IMAGE}
EOF
+ fi
+ ;;
+
+ *)
+
+cat >> binary.sh << EOF
+
+xorriso -as mkisofs ${XORRISO_OPTIONS} -o ${IMAGE} binary
+EOF
+
+ ;;
+esac
+
case "${LB_BUILD_WITH_CHROOT}" in
true)
# Moving image