summaryrefslogtreecommitdiff
path: root/helpers/lh_binary_iso
blob: d39313fc7b4360357fbca8e4f9cefdef28f6a704 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh

# lh_binary_iso(1) - build iso binary image

set -e

# Source common functions
for FUNCTION in /usr/share/live-helper/functions/*.sh
do
	. ${FUNCTION}
done

# Reading configuration files
Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/image
Set_defaults

# Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap

# Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock

# Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock

# Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/binary_iso

for IMAGE in ${LIVE_BINARY_IMAGE}
do
	if [ "${IMAGE}" = "iso" ]
	then
		# Remove old binary
		if [ -f "${LIVE_ROOT}"/binary.iso ]
		then
			rm -f "${LIVE_ROOT}"/binary.iso
		fi

		# Create image
		if [ "${LIVE_ARCHITECTURE}" = "amd64" ] || [ "${LIVE_ARCHITECTURE}" = "i386" ]
		then
			${LH_GENISOIMAGE} -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o "${LIVE_ROOT}"/"${LIVE_IMAGE}"binary.iso -r -J -l -V "${LIVE_ISO_VOLUME}" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table "${LIVE_ROOT}"/binary ${LIVE_INCLUDE_IMAGE}
		else
			echo "W: Bootloader on your architecture not yet supported (Continuing in 5 seconds)."
			sleep 5
			${LH_GENISOIMAGE} -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o "${LIVE_ROOT}"/"${LIVE_IMAGE}"binary.iso -r -J -l -V "${LIVE_ISO_VOLUME}" "${LIVE_ROOT}"/binary ${LIVE_INCLUDE_IMAGE}
		fi

		# Creating stage file
		Create_stagefile "${LIVE_ROOT}"/.stage/binary_iso
	fi
done