summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-02-18 17:34:29 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:17:04 +0100
commitc66942f06ed5dcebab29711afee6dcef8d865adf (patch)
tree52a5557cfe76cc3cc7e386e5b9b52436832e0a94 /helpers
parent9d6a4dedc2736389349345c29d3a8a48b7b70692 (diff)
downloadvyos-live-build-c66942f06ed5dcebab29711afee6dcef8d865adf.tar.gz
vyos-live-build-c66942f06ed5dcebab29711afee6dcef8d865adf.zip
Reworking iso-hybrid as an independent binary image type.
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/binary_disk2
-rwxr-xr-xhelpers/binary_grub4
-rwxr-xr-xhelpers/binary_grub24
-rwxr-xr-xhelpers/binary_iso31
-rwxr-xr-xhelpers/binary_silo4
-rwxr-xr-xhelpers/binary_syslinux6
-rwxr-xr-xhelpers/binary_yaboot4
-rwxr-xr-xhelpers/clean4
-rwxr-xr-xhelpers/source_disk12
-rwxr-xr-xhelpers/source_iso12
10 files changed, 50 insertions, 33 deletions
diff --git a/helpers/binary_disk b/helpers/binary_disk
index 811673471..b6edf4a56 100755
--- a/helpers/binary_disk
+++ b/helpers/binary_disk
@@ -24,7 +24,7 @@ Read_conffiles config/all config/common config/bootstrap config/chroot config/bi
Set_defaults
case "${LH_BINARY_IMAGES}" in
- iso|usb*)
+ iso*)
;;
*)
exit 0
diff --git a/helpers/binary_grub b/helpers/binary_grub
index b3f9ba1f2..373d64e23 100755
--- a/helpers/binary_grub
+++ b/helpers/binary_grub
@@ -128,7 +128,7 @@ esac
# Setting destination directory
case "${LH_BINARY_IMAGES}" in
- iso|tar)
+ iso*|tar)
case "${LH_INITRAMFS}" in
casper)
DESTDIR_LIVE="binary/casper"
@@ -276,7 +276,7 @@ mkdir -p binary/boot/grub
cp -r "${TEMPLATES}"/* binary/boot/grub
case ${LH_BINARY_IMAGES} in
- iso)
+ iso*)
FILES="chroot/usr/lib/grub/*/stage2_eltorito"
;;
diff --git a/helpers/binary_grub2 b/helpers/binary_grub2
index 0cf06183f..7a7b26e80 100755
--- a/helpers/binary_grub2
+++ b/helpers/binary_grub2
@@ -102,7 +102,7 @@ esac
# Setting destination directory
case "${LH_BINARY_IMAGES}" in
- iso|tar)
+ iso*|tar)
case "${LH_INITRAMFS}" in
casper)
DESTDIR_LIVE="binary/casper"
@@ -249,7 +249,7 @@ mkdir -p binary/boot/grub
cp -r "${TEMPLATES}"/* binary/boot/grub
case ${LH_BINARY_IMAGES} in
- iso)
+ iso*)
FILES="chroot/usr/lib/grub/i386-pc/*.mod chroot/usr/lib/grub/i386-pc/*.lst chroot/usr/lib/grub/i386-pc/efiemu??.o chroot/usr/share/grub/*.pf2"
;;
diff --git a/helpers/binary_iso b/helpers/binary_iso
index 4012a7021..811310d20 100755
--- a/helpers/binary_iso
+++ b/helpers/binary_iso
@@ -23,10 +23,19 @@ Arguments "${@}"
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults
-if ! In_list iso "${LH_BINARY_IMAGES}"
-then
- exit 0
-fi
+case "${LH_BINARY_IMAGES}" in
+ iso)
+ IMAGE="binary.iso"
+ ;;
+
+ iso-hybrid)
+ IMAGE="binary-hybrid.iso"
+ ;;
+
+ *)
+ exit 0
+ ;;
+esac
Echo_message "Begin building binary iso image..."
@@ -45,7 +54,7 @@ Create_lockfile .lock
# Checking depends
Check_package chroot/usr/bin/genisoimage genisoimage
-if [ "${LH_BINARY_ISO_HYBRID}" = "true" ]
+if [ "${LH_BINARY_IMAGES}" = "iso-hybrid" ]
then
Check_package chroot/usr/bin/isohybrid syslinux-common
fi
@@ -57,9 +66,9 @@ Restore_cache cache/packages_binary
Install_package
# Remove old iso image
-if [ -f binary.iso ]
+if [ -f ${IMAGE} ]
then
- rm -f binary.iso
+ rm -f ${IMAGE}
fi
# Handle genisoimage generic options
@@ -177,15 +186,15 @@ fi
cat >> binary.sh << EOF
-genisoimage ${GENISOIMAGE_OPTIONS} -o binary.iso binary
+genisoimage ${GENISOIMAGE_OPTIONS} -o ${IMAGE} binary
EOF
-if [ "${LH_BINARY_ISO_HYRBID}" = "true" ]
+if [ "${LH_BINARY_IMAGES}" = "iso-hybrid" ]
then
cat >> binary.sh << EOF
-isohybrid binary.iso
+isohybrid ${IMAGE}
EOF
fi
@@ -199,7 +208,7 @@ case "${LH_CHROOT_BUILD}" in
Chroot chroot "sh binary.sh"
# Move image
- mv chroot/binary chroot/binary.iso ./
+ mv chroot/binary chroot/${IMAGE} ./
rm -f chroot/binary.sh
;;
diff --git a/helpers/binary_silo b/helpers/binary_silo
index df7ee1001..356c47e8c 100755
--- a/helpers/binary_silo
+++ b/helpers/binary_silo
@@ -30,7 +30,7 @@ fi
# Check image type
case "${LH_BINARY_IMAGES}" in
- iso|usb*|tar)
+ iso*|usb*|tar)
;;
net)
@@ -225,7 +225,7 @@ fi
LINUX_INSTALL="$(/bin/echo ${LINUX_INSTALL} | sed -e 's|binary||g' -e 's|//|/|g')"
case "${LH_BINARY_IMAGES}" in
- iso|usb*)
+ iso*|usb*)
# Copying silo
mkdir -p binary/boot
diff --git a/helpers/binary_syslinux b/helpers/binary_syslinux
index 9d4cab12b..4fa280544 100755
--- a/helpers/binary_syslinux
+++ b/helpers/binary_syslinux
@@ -90,7 +90,7 @@ Syslinux_live_entry ()
APPEND="${5}"
case "${LH_BINARY_IMAGES}" in
- iso|usb*)
+ iso*|usb*)
NUMBER="$(ls -1 ${KERNEL_PATH} | grep 'vmlinuz[0-9]\+$' | wc -l)"
NUMBER="$((${NUMBER} +1))"
@@ -363,7 +363,7 @@ esac
# Setting boot method specific variables
case "${LH_BINARY_IMAGES}" in
- iso)
+ iso*)
SYSLINUX_PATH="binary/isolinux"
KERNEL_PATH="binary/${INITFS}"
SCREEN_PATH="${SYSLINUX_PATH}"
@@ -581,7 +581,7 @@ Configure_syslinux_templates
# Configure syslinux setup per boot method
case "${LH_BINARY_IMAGES}" in
- iso)
+ iso*)
case "${LH_CHROOT_BUILD}" in
true)
cp chroot/usr/lib/syslinux/isolinux.bin ${SCREEN_PATH}
diff --git a/helpers/binary_yaboot b/helpers/binary_yaboot
index ef44e6e68..b896eac73 100755
--- a/helpers/binary_yaboot
+++ b/helpers/binary_yaboot
@@ -135,7 +135,7 @@ esac
# Setting destination directory
case "${LH_BINARY_IMAGES}" in
- iso)
+ iso*)
case "${LH_INITRAMFS}" in
casper)
DESTDIR_LIVE="binary/casper"
@@ -272,7 +272,7 @@ fi
LINUX_INSTALL="$(/bin/echo ${LINUX_INSTALL} | sed -e 's|binary||g' -e 's|//|/|g')"
case "${LH_BINARY_IMAGES}" in
- iso|usb*)
+ iso*|usb*)
# Copying yaboot
mkdir -p binary/yaboot
diff --git a/helpers/clean b/helpers/clean
index 8f7420930..0596e3974 100755
--- a/helpers/clean
+++ b/helpers/clean
@@ -90,7 +90,7 @@ do
--binary)
${LH_ROOT_COMMAND} umount -f binary.tmp > /dev/null 2>&1 || true
rm -rf binary.tmp binary.deb binary.udeb
- rm -f binary.iso
+ rm -f binary*.iso
rm -f binary*.img
rm -f binary*.tar.gz
rm -f binary.sh
@@ -122,7 +122,7 @@ do
;;
--source)
- rm -f source.iso
+ rm -f source*.iso
rm -f source*.img
rm -f source*.tar
rm -f source*.tar.gz
diff --git a/helpers/source_disk b/helpers/source_disk
index a765bb47a..50db471cb 100755
--- a/helpers/source_disk
+++ b/helpers/source_disk
@@ -23,10 +23,14 @@ Arguments "${@}"
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults
-if [ "${LH_SOURCE_IMAGES}" != "iso" ]
-then
- exit 0
-fi
+case "${LH_SOURCE_IMAGES}" in
+ iso*)
+ ;;
+
+ *)
+ exit 0
+ ;;
+esac
Echo_message "Begin installing disk information..."
diff --git a/helpers/source_iso b/helpers/source_iso
index 0ef1bcbec..0752ebeb3 100755
--- a/helpers/source_iso
+++ b/helpers/source_iso
@@ -28,10 +28,14 @@ then
exit 0
fi
-if ! In_list iso "${LH_SOURCE_IMAGES}"
-then
- exit 0
-fi
+case "${LH_SOURCE_IMAGES}" in
+ iso*)
+ ;;
+
+ *)
+ exit 0
+ ;;
+esac
Echo_message "Begin building source iso image..."