config: s/LIVE_IMAGE_TYPE/LB_IMAGE_TYPE/
no backwards compatibility hack for reading the old var from existing saved config used because this was previously stored in the alternate format config/build file. Gbp-Dch: Short
This commit is contained in:
parent
83d9145257
commit
500f205073
|
@ -60,8 +60,10 @@ Prepare_config ()
|
||||||
LB_DISTRIBUTION_BINARY="${LB_DISTRIBUTION_BINARY:-${LB_DISTRIBUTION_CHROOT}}"
|
LB_DISTRIBUTION_BINARY="${LB_DISTRIBUTION_BINARY:-${LB_DISTRIBUTION_CHROOT}}"
|
||||||
|
|
||||||
LB_IMAGE_NAME="${LB_IMAGE_NAME:-live-image}"
|
LB_IMAGE_NAME="${LB_IMAGE_NAME:-live-image}"
|
||||||
LIVE_IMAGE_NAME="${LB_IMAGE_NAME}" #for backwards compatibility with hooks
|
LB_IMAGE_TYPE="${LB_IMAGE_TYPE:-iso-hybrid}"
|
||||||
LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE:-iso-hybrid}"
|
#for backwards compatibility with hooks
|
||||||
|
LIVE_IMAGE_NAME="${LB_IMAGE_NAME}"
|
||||||
|
LIVE_IMAGE_TYPE="${LB_IMAGE_TYPE}"
|
||||||
|
|
||||||
if [ -z "${LB_ARCHITECTURE}" ]; then
|
if [ -z "${LB_ARCHITECTURE}" ]; then
|
||||||
if [ $(which dpkg) ]; then
|
if [ $(which dpkg) ]; then
|
||||||
|
@ -283,11 +285,11 @@ Prepare_config ()
|
||||||
|
|
||||||
case "${LB_ARCHITECTURE}" in
|
case "${LB_ARCHITECTURE}" in
|
||||||
amd64|i386)
|
amd64|i386)
|
||||||
LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE:-iso-hybrid}"
|
LB_IMAGE_TYPE="${LB_IMAGE_TYPE:-iso-hybrid}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE:-iso}"
|
LB_IMAGE_TYPE="${LB_IMAGE_TYPE:-iso}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -295,7 +297,7 @@ Prepare_config ()
|
||||||
then
|
then
|
||||||
case "${LB_ARCHITECTURE}" in
|
case "${LB_ARCHITECTURE}" in
|
||||||
amd64|i386)
|
amd64|i386)
|
||||||
case "${LIVE_IMAGE_TYPE}" in
|
case "${LB_IMAGE_TYPE}" in
|
||||||
hdd|netboot)
|
hdd|netboot)
|
||||||
LB_BOOTLOADERS="syslinux"
|
LB_BOOTLOADERS="syslinux"
|
||||||
;;
|
;;
|
||||||
|
@ -363,7 +365,7 @@ Prepare_config ()
|
||||||
local _LB_BOOTAPPEND_PRESEED
|
local _LB_BOOTAPPEND_PRESEED
|
||||||
if [ -n "${LB_DEBIAN_INSTALLER_PRESEEDFILE}" ]
|
if [ -n "${LB_DEBIAN_INSTALLER_PRESEEDFILE}" ]
|
||||||
then
|
then
|
||||||
case "${LIVE_IMAGE_TYPE}" in
|
case "${LB_IMAGE_TYPE}" in
|
||||||
iso|iso-hybrid)
|
iso|iso-hybrid)
|
||||||
_LB_BOOTAPPEND_PRESEED="file=/cdrom/install/${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
|
_LB_BOOTAPPEND_PRESEED="file=/cdrom/install/${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
|
||||||
;;
|
;;
|
||||||
|
@ -567,7 +569,7 @@ Validate_config_permitted_values ()
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! In_list "${LIVE_IMAGE_TYPE}" iso iso-hybrid hdd tar netboot; then
|
if ! In_list "${LB_IMAGE_TYPE}" iso iso-hybrid hdd tar netboot; then
|
||||||
Echo_error "You have specified an invalid value for --binary-image."
|
Echo_error "You have specified an invalid value for --binary-image."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -707,13 +709,13 @@ Validate_config_dependencies ()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if In_list "grub-pc" ${LB_BOOTLOADERS} || In_list "grub-efi" ${LB_BOOTLOADERS} || In_list "grub-legacy" ${LB_BOOTLOADERS}; then
|
if In_list "grub-pc" ${LB_BOOTLOADERS} || In_list "grub-efi" ${LB_BOOTLOADERS} || In_list "grub-legacy" ${LB_BOOTLOADERS}; then
|
||||||
if In_list "${LIVE_IMAGE_TYPE}" hdd netboot; then
|
if In_list "${LB_IMAGE_TYPE}" hdd netboot; then
|
||||||
Echo_error "You have selected an invalid combination of bootloaders and live image type; the grub-* bootloaders are not compatible with hdd and netboot types."
|
Echo_error "You have selected an invalid combination of bootloaders and live image type; the grub-* bootloaders are not compatible with hdd and netboot types."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${LIVE_IMAGE_TYPE}" = "hdd" ] && [ "${LB_FIRST_BOOTLOADER}" = "grub-legacy" ]; then
|
if [ "${LB_IMAGE_TYPE}" = "hdd" ] && [ "${LB_FIRST_BOOTLOADER}" = "grub-legacy" ]; then
|
||||||
Echo_error "You have selected a combination of bootloader and image type that is currently not supported by live-build. Please use either another bootloader or a different image type."
|
Echo_error "You have selected a combination of bootloader and image type that is currently not supported by live-build. Please use either another bootloader or a different image type."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -21,7 +21,7 @@ USAGE="${PROGRAM} [--force]"
|
||||||
# Processing arguments and configuration files
|
# Processing arguments and configuration files
|
||||||
Init_config_data "${@}"
|
Init_config_data "${@}"
|
||||||
|
|
||||||
if ! In_list "${LIVE_IMAGE_TYPE}" iso iso-hybrid hdd; then
|
if ! In_list "${LB_IMAGE_TYPE}" iso iso-hybrid hdd; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ USAGE="${PROGRAM} [--force]"
|
||||||
# Processing arguments and configuration files
|
# Processing arguments and configuration files
|
||||||
Init_config_data "${@}"
|
Init_config_data "${@}"
|
||||||
|
|
||||||
if In_list "${LIVE_IMAGE_TYPE}" hdd netboot; then
|
if In_list "${LB_IMAGE_TYPE}" hdd netboot; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ USAGE="${PROGRAM} [--force]"
|
||||||
# Processing arguments and configuration files
|
# Processing arguments and configuration files
|
||||||
Init_config_data "${@}"
|
Init_config_data "${@}"
|
||||||
|
|
||||||
if In_list "${LIVE_IMAGE_TYPE}" hdd netboot; then
|
if In_list "${LB_IMAGE_TYPE}" hdd netboot; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ fi
|
||||||
mkdir -p binary/boot/grub
|
mkdir -p binary/boot/grub
|
||||||
cp -r "${_SOURCE}"/* binary/boot/grub
|
cp -r "${_SOURCE}"/* binary/boot/grub
|
||||||
|
|
||||||
case ${LIVE_IMAGE_TYPE} in
|
case ${LB_IMAGE_TYPE} in
|
||||||
iso|iso-hybrid)
|
iso|iso-hybrid)
|
||||||
FILES="chroot/usr/lib/grub/*/stage2_eltorito"
|
FILES="chroot/usr/lib/grub/*/stage2_eltorito"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -21,7 +21,7 @@ USAGE="${PROGRAM} [--force]"
|
||||||
# Processing arguments and configuration files
|
# Processing arguments and configuration files
|
||||||
Init_config_data "${@}"
|
Init_config_data "${@}"
|
||||||
|
|
||||||
if In_list "${LIVE_IMAGE_TYPE}" hdd netboot; then
|
if In_list "${LB_IMAGE_TYPE}" hdd netboot; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ Install_package
|
||||||
# Copying templates
|
# Copying templates
|
||||||
mkdir -p binary/boot/grub/i386-pc
|
mkdir -p binary/boot/grub/i386-pc
|
||||||
|
|
||||||
case ${LIVE_IMAGE_TYPE} in
|
case ${LB_IMAGE_TYPE} in
|
||||||
iso|iso-hybrid)
|
iso|iso-hybrid)
|
||||||
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"
|
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"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -21,7 +21,7 @@ USAGE="${PROGRAM} [--force]"
|
||||||
# Processing arguments and configuration files
|
# Processing arguments and configuration files
|
||||||
Init_config_data "${@}"
|
Init_config_data "${@}"
|
||||||
|
|
||||||
if [ "${LIVE_IMAGE_TYPE}" != "hdd" ]; then
|
if [ "${LB_IMAGE_TYPE}" != "hdd" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ then
|
||||||
cd "${OLDPWD}"
|
cd "${OLDPWD}"
|
||||||
|
|
||||||
# Removing symlinks
|
# Removing symlinks
|
||||||
if [ "${LIVE_IMAGE_TYPE}" = "hdd" ]; then
|
if [ "${LB_IMAGE_TYPE}" = "hdd" ]; then
|
||||||
find binary -type l | xargs rm -f
|
find binary -type l | xargs rm -f
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -21,7 +21,7 @@ USAGE="${PROGRAM} [--force]"
|
||||||
# Processing arguments and configuration files
|
# Processing arguments and configuration files
|
||||||
Init_config_data "${@}"
|
Init_config_data "${@}"
|
||||||
|
|
||||||
case "${LIVE_IMAGE_TYPE}" in
|
case "${LB_IMAGE_TYPE}" in
|
||||||
iso)
|
iso)
|
||||||
IMAGE="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.iso"
|
IMAGE="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.iso"
|
||||||
;;
|
;;
|
||||||
|
@ -66,7 +66,7 @@ fi
|
||||||
XORRISO_OPTIONS="-R -r -J -joliet-long -l -cache-inodes -iso-level 3"
|
XORRISO_OPTIONS="-R -r -J -joliet-long -l -cache-inodes -iso-level 3"
|
||||||
|
|
||||||
# Handle xorriso live-build specific options
|
# Handle xorriso live-build specific options
|
||||||
if [ "${LIVE_IMAGE_TYPE}" = "iso-hybrid" ]
|
if [ "${LB_IMAGE_TYPE}" = "iso-hybrid" ]
|
||||||
then
|
then
|
||||||
XORRISO_OPTIONS="${XORRISO_OPTIONS} -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -partition_offset 16"
|
XORRISO_OPTIONS="${XORRISO_OPTIONS} -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -partition_offset 16"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -21,7 +21,7 @@ USAGE="${PROGRAM} [--force]"
|
||||||
# Processing arguments and configuration files
|
# Processing arguments and configuration files
|
||||||
Init_config_data "${@}"
|
Init_config_data "${@}"
|
||||||
|
|
||||||
if [ "${LIVE_IMAGE_TYPE}" != "netboot" ]; then
|
if [ "${LB_IMAGE_TYPE}" != "netboot" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "${LIVE_IMAGE_TYPE}" in
|
case "${LB_IMAGE_TYPE}" in
|
||||||
iso)
|
iso)
|
||||||
IMAGE="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.iso"
|
IMAGE="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.iso"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -48,7 +48,7 @@ case "${LB_INITRAMFS}" in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Assembling image specifics
|
# Assembling image specifics
|
||||||
case "${LIVE_IMAGE_TYPE}" in
|
case "${LB_IMAGE_TYPE}" in
|
||||||
iso|iso-hybrid)
|
iso|iso-hybrid)
|
||||||
_BOOTLOADER="isolinux"
|
_BOOTLOADER="isolinux"
|
||||||
_TARGET="binary/isolinux"
|
_TARGET="binary/isolinux"
|
||||||
|
|
|
@ -21,7 +21,7 @@ USAGE="${PROGRAM} [--force]"
|
||||||
# Processing arguments and configuration files
|
# Processing arguments and configuration files
|
||||||
Init_config_data "${@}"
|
Init_config_data "${@}"
|
||||||
|
|
||||||
if [ "${LIVE_IMAGE_TYPE}" != "tar" ]; then
|
if [ "${LB_IMAGE_TYPE}" != "tar" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ USAGE="${PROGRAM} [--force]"
|
||||||
# Processing arguments and configuration files
|
# Processing arguments and configuration files
|
||||||
Init_config_data "${@}"
|
Init_config_data "${@}"
|
||||||
|
|
||||||
if [ "${LIVE_IMAGE_TYPE}" != "iso" ] && [ "${LIVE_IMAGE_TYPE}" != "iso-hybrid" ]
|
if [ "${LB_IMAGE_TYPE}" != "iso" ] && [ "${LB_IMAGE_TYPE}" != "iso-hybrid" ]
|
||||||
then
|
then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -51,7 +51,7 @@ Restore_package_cache binary
|
||||||
# Installing depends
|
# Installing depends
|
||||||
Install_package
|
Install_package
|
||||||
|
|
||||||
case "${LIVE_IMAGE_TYPE}" in
|
case "${LB_IMAGE_TYPE}" in
|
||||||
iso)
|
iso)
|
||||||
_IMAGES="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.iso"
|
_IMAGES="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.iso"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -32,7 +32,7 @@ Check_stagefile
|
||||||
# Acquire lock file
|
# Acquire lock file
|
||||||
Acquire_lockfile
|
Acquire_lockfile
|
||||||
|
|
||||||
case "${LIVE_IMAGE_TYPE}" in
|
case "${LB_IMAGE_TYPE}" in
|
||||||
netboot)
|
netboot)
|
||||||
if [ ! -f chroot/sbin/mount.cifs ]
|
if [ ! -f chroot/sbin/mount.cifs ]
|
||||||
then
|
then
|
||||||
|
|
|
@ -378,7 +378,7 @@ Local_arguments ()
|
||||||
;;
|
;;
|
||||||
|
|
||||||
-b|--binary-image|--binary-images)
|
-b|--binary-image|--binary-images)
|
||||||
LIVE_IMAGE_TYPE="${2}"
|
LB_IMAGE_TYPE="${2}"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -1205,8 +1205,8 @@ mkdir -p config/bootloaders
|
||||||
cat > config/binary << EOF
|
cat > config/binary << EOF
|
||||||
# config/binary - options for live-build(7), binary stage
|
# config/binary - options for live-build(7), binary stage
|
||||||
|
|
||||||
# \$LIVE_IMAGE_TYPE: set image type
|
# \$LB_IMAGE_TYPE: set image type
|
||||||
LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE}"
|
LB_IMAGE_TYPE="${LB_IMAGE_TYPE}"
|
||||||
|
|
||||||
# \$LB_BINARY_FILESYSTEM: set image filesystem
|
# \$LB_BINARY_FILESYSTEM: set image filesystem
|
||||||
LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM}"
|
LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM}"
|
||||||
|
|
|
@ -60,7 +60,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Setting destination directory
|
# Setting destination directory
|
||||||
case "${LIVE_IMAGE_TYPE}" in
|
case "${LB_IMAGE_TYPE}" in
|
||||||
netboot)
|
netboot)
|
||||||
DESTDIR="tftpboot/debian-install/${LB_ARCHITECTURE}"
|
DESTDIR="tftpboot/debian-install/${LB_ARCHITECTURE}"
|
||||||
;;
|
;;
|
||||||
|
@ -76,7 +76,7 @@ case "${LB_DEBIAN_INSTALLER}" in
|
||||||
DI_IMAGE_TYPE="netboot"
|
DI_IMAGE_TYPE="netboot"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
case "${LIVE_IMAGE_TYPE}" in
|
case "${LB_IMAGE_TYPE}" in
|
||||||
netboot)
|
netboot)
|
||||||
DI_IMAGE_TYPE="netboot"
|
DI_IMAGE_TYPE="netboot"
|
||||||
;;
|
;;
|
||||||
|
@ -734,7 +734,7 @@ EOF
|
||||||
DISTRIBUTIONS="${DISTRIBUTIONS} ${LB_PARENT_DISTRIBUTION_BINARY}"
|
DISTRIBUTIONS="${DISTRIBUTIONS} ${LB_PARENT_DISTRIBUTION_BINARY}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "${LIVE_IMAGE_TYPE}" in
|
case "${LB_IMAGE_TYPE}" in
|
||||||
hdd)
|
hdd)
|
||||||
case "${LB_BINARY_FILESYSTEM}" in
|
case "${LB_BINARY_FILESYSTEM}" in
|
||||||
fat*|ntfs)
|
fat*|ntfs)
|
||||||
|
|
Loading…
Reference in New Issue