summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/lh_binary3
-rwxr-xr-xhelpers/lh_binary_chroot5
-rwxr-xr-xhelpers/lh_binary_debian-installer247
-rwxr-xr-xhelpers/lh_binary_encryption21
-rwxr-xr-xhelpers/lh_binary_grub72
-rwxr-xr-xhelpers/lh_binary_hdd5
-rwxr-xr-xhelpers/lh_binary_includes19
-rwxr-xr-xhelpers/lh_binary_iso15
-rwxr-xr-xhelpers/lh_binary_linuximage15
-rwxr-xr-xhelpers/lh_binary_localincludes5
-rwxr-xr-xhelpers/lh_binary_manifest17
-rwxr-xr-xhelpers/lh_binary_md5sum5
-rwxr-xr-xhelpers/lh_binary_memtest11
-rwxr-xr-xhelpers/lh_binary_net5
-rwxr-xr-xhelpers/lh_binary_rootfs41
-rwxr-xr-xhelpers/lh_binary_syslinux116
-rwxr-xr-xhelpers/lh_binary_usb-hdd (renamed from helpers/lh_binary_usb)17
-rwxr-xr-xhelpers/lh_binary_yaboot29
-rwxr-xr-xhelpers/lh_bootstrap5
-rwxr-xr-xhelpers/lh_bootstrap_cdebootstrap60
-rwxr-xr-xhelpers/lh_bootstrap_debootstrap57
-rwxr-xr-xhelpers/lh_chroot5
-rwxr-xr-xhelpers/lh_chroot_apt5
-rwxr-xr-xhelpers/lh_chroot_debianchroot5
-rwxr-xr-xhelpers/lh_chroot_hacks5
-rwxr-xr-xhelpers/lh_chroot_hooks5
-rwxr-xr-xhelpers/lh_chroot_hosts5
-rwxr-xr-xhelpers/lh_chroot_interactive5
-rwxr-xr-xhelpers/lh_chroot_linuximage9
-rwxr-xr-xhelpers/lh_chroot_localhooks5
-rwxr-xr-xhelpers/lh_chroot_localincludes5
-rwxr-xr-xhelpers/lh_chroot_localization9
-rwxr-xr-xhelpers/lh_chroot_localpackages9
-rwxr-xr-xhelpers/lh_chroot_localpackageslists9
-rwxr-xr-xhelpers/lh_chroot_packages9
-rwxr-xr-xhelpers/lh_chroot_packageslists9
-rwxr-xr-xhelpers/lh_chroot_proc5
-rwxr-xr-xhelpers/lh_chroot_resolv5
-rwxr-xr-xhelpers/lh_chroot_sources135
-rwxr-xr-xhelpers/lh_chroot_symlinks5
-rwxr-xr-xhelpers/lh_chroot_sysfs5
-rwxr-xr-xhelpers/lh_chroot_sysvinit7
-rwxr-xr-xhelpers/lh_chroot_sysvrc5
-rwxr-xr-xhelpers/lh_chroot_tasks9
-rwxr-xr-xhelpers/lh_clean9
-rwxr-xr-xhelpers/lh_config60
-rwxr-xr-xhelpers/lh_losetup5
-rwxr-xr-xhelpers/lh_source7
-rwxr-xr-xhelpers/lh_source_config5
-rwxr-xr-xhelpers/lh_source_download7
-rwxr-xr-xhelpers/lh_source_generic5
-rwxr-xr-xhelpers/lh_source_hdd5
-rwxr-xr-xhelpers/lh_source_iso5
-rwxr-xr-xhelpers/lh_source_md5sum5
-rwxr-xr-xhelpers/lh_source_net5
-rwxr-xr-xhelpers/lh_source_usb-hdd (renamed from helpers/lh_source_usb)17
-rwxr-xr-xhelpers/lh_testroot4
-rwxr-xr-xhelpers/make-live2
58 files changed, 853 insertions, 333 deletions
diff --git a/helpers/lh_binary b/helpers/lh_binary
index 8498d93..c3575cd 100755
--- a/helpers/lh_binary
+++ b/helpers/lh_binary
@@ -42,6 +42,7 @@ lh_binary_encryption "${@}"
# Prepare images
lh_binary_linuximage "${@}"
+lh_binary_debian-installer "${@}"
lh_binary_memtest "${@}"
lh_binary_grub "${@}"
lh_binary_syslinux "${@}"
@@ -54,7 +55,7 @@ lh_binary_md5sum "${@}"
lh_binary_hdd "${@}"
lh_binary_iso "${@}"
lh_binary_net "${@}"
-lh_binary_usb "${@}"
+lh_binary_usb-hdd "${@}"
# Deconfiguring chroot
rm -f .stage/chroot_sources
diff --git a/helpers/lh_binary_chroot b/helpers/lh_binary_chroot
index 58835ad..b92f94a 100755
--- a/helpers/lh_binary_chroot
+++ b/helpers/lh_binary_chroot
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "binary_chroot: Init"
diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer
new file mode 100755
index 0000000..6d6d784
--- /dev/null
+++ b/helpers/lh_binary_debian-installer
@@ -0,0 +1,247 @@
+#!/bin/sh
+
+# lh_binary_debian-installer(1) - install debian-installer into binary
+# Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org>
+#
+# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
+# This is free software, and you are welcome to redistribute it
+# under certain conditions; see COPYING for details.
+
+set -e
+
+# Source common functions
+for FUNCTION in /usr/share/live-helper/functions/*.sh
+do
+ . ${FUNCTION}
+done
+
+# Set static variables
+DESCRIPTION="install debian-installer into binary"
+HELP=""
+USAGE="${PROGRAM} [--force]"
+
+Arguments "${@}"
+
+Echo_debug "Init ${PROGRAM}"
+
+# Reading configuration files
+Read_conffile config/common
+Read_conffile config/bootstrap
+Read_conffile config/chroot
+Read_conffile config/binary
+Read_conffile config/source
+Set_defaults
+
+if [ "${LIVE_DEBIAN_INSTALLER}" != "enabled" ]
+then
+ exit 0
+fi
+
+Breakpoint "binary_debian-installer: Init"
+
+# Requiring stage file
+Require_stagefile .stage/bootstrap
+
+# Checking stage file
+Check_stagefile .stage/binary_debian-installer
+
+# Checking lock file
+Check_lockfile .lock
+
+# Creating lock file
+Create_lockfile .lock
+
+# Setting destination directory
+case "${LIVE_BINARY_IMAGE}" in
+ iso)
+ DESTDIR="binary/install"
+ DESTDIR_INSTALLER="cdrom"
+ ;;
+
+ net)
+ DESTDIR="tftpboot"
+ DESTDIR_INSTALLER="netboot"
+
+ Echo_error "Not supported yet (FIXME)"
+ exit 1
+ ;;
+
+ usb-hdd|hdd)
+ DESTDIR="binary"
+ DESTDIR_INSTALLER="hd-media"
+ ;;
+esac
+
+# Temporary check for broken syslinux
+if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
+then
+ # Assemble multi-arch
+ if [ -n "${MULTIARCH}" ]
+ then
+ case "${LIVE_ARCHITECTURE}" in
+ amd64)
+ DESTDIR="${DESTDIR}.amd"
+ ;;
+
+ i386)
+ DESTDIR="${DESTDIR}.386"
+ ;;
+
+ powerpc)
+ DESTDIR="${DESTDIR}.ppc"
+ ;;
+ esac
+ fi
+fi
+
+# Downloading debian-installer
+mkdir -p "${DESTDIR}"
+
+wget --no-clobber -O "${DESTDIR}"/vmlinuz "${LIVE_MIRROR_BUILD}"/dists/"${LIVE_DISTRIBUTION}"/main/installer-"${LIVE_ARCHITECTURE}"/current/images/"${DESTDIR_INSTALLER}"/vmlinuz
+wget --no-clobber -O "${DESTDIR}"/initrd.gz "${LIVE_MIRROR_BUILD}"/dists/"${LIVE_DISTRIBUTION}"/main/installer-"${LIVE_ARCHITECTURE}"/current/images/"${DESTDIR_INSTALLER}"/initrd.gz
+
+# Downloading graphical-installer
+if [ "${LIVE_ARCHITECTURE}" = "amd64" ] || [ "${LIVE_ARCHITECTURE}" = "i386" ] || [ "${LIVE_ARCHITECTURE}" = "powerpc" ]
+then
+ mkdir -p "${DESTDIR}"/gtk
+
+ wget --no-clobber -O "${DESTDIR}"/gtk/vmlinuz "${LIVE_MIRROR_BUILD}"/dists/"${LIVE_DISTRIBUTION}"/main/installer-"${LIVE_ARCHITECTURE}"/current/images/"${DESTDIR_INSTALLER}"/gtk/vmlinuz
+ wget --no-clobber -O "${DESTDIR}"/gtk/initrd.gz "${LIVE_MIRROR_BUILD}"/dists/"${LIVE_DISTRIBUTION}"/main/installer-"${LIVE_ARCHITECTURE}"/current/images/"${DESTDIR_INSTALLER}"/gtk/initrd.gz
+fi
+
+# Downloading udebs
+mkdir -p binary/dists/"${LIVE_DISTRIBUTION}"/main/debian-installer/binary-"${LIVE_ARCHITECTURE}"
+cd binary/dists/"${LIVE_DISTRIBUTION}"/main/debian-installer/binary-"${LIVE_ARCHITECTURE}"
+wget "${LIVE_MIRROR_BUILD}"/dists/"${LIVE_DISTRIBUTION}"/main/debian-installer/binary-"${LIVE_ARCHITECTURE}"/Packages.gz
+gunzip -c Packages.gz > Packages
+cd "${OLDPWD}"
+
+for DISTRIBUTION in frozen stable testing unstable
+do
+ ln -s ${LIVE_DISTRIBUTION} binary/dists/${DISTRIBUTION}
+done
+
+DEBS="`awk '/Filename: / { print $2 }' binary/dists/${LIVE_DISTRIBUTION}/main/debian-installer/binary-${LIVE_ARCHITECTURE}/Packages`"
+UDEBS="`echo ${DEBS} | grep '.*.udeb'`"
+
+rm -f packages.di
+
+for UDEB in ${UDEBS}
+do
+ mkdir -p binary/`dirname ${UDEB}`
+ cd binary/`dirname ${UDEB}`
+ wget "${LIVE_MIRROR_BUILD}"/${UDEB}
+ cd "${OLDPWD}"
+done
+
+# Downloading debs
+if [ -d cache/packages_bootstrap ]
+then
+ for FILE in cache/packages_bootstrap/*.deb
+ do
+ SOURCE="`dpkg -f ${FILE} Source`"
+
+ if [ -z "${SOURCE}" ]
+ then
+ SOURCE="`basename ${FILE} | awk -F_ '{ print $1 }'`"
+ fi
+
+ case "${SOURCE}" in
+ lib?*)
+ LETTER="`echo ${SOURCE} | sed 's/\(....\).*/\1/'`"
+ ;;
+
+ *)
+ LETTER="`echo ${SOURCE} | sed 's/\(.\).*/\1/'`"
+ ;;
+ esac
+
+ # Install directory
+ mkdir -p binary/pool/main/"${LETTER}"/"${SOURCE}"
+
+ # Move files
+ cp "${FILE}" binary/pool/main/"${LETTER}"/"${SOURCE}"
+ done
+fi
+
+mkdir -p binary/dists/${LIVE_DISTRIBUTION}/main/binary-${LIVE_ARCHITECTURE}
+
+cat > binary/dists/${LIVE_DISTRIBUTION}/main/binary-${LIVE_ARCHITECTURE}/Release << EOF
+Archive: ${LIVE_DISTRIBUTION}
+Component: main
+Origin: Debian
+Label: Debian
+Architecture: ${LIVE_ARCHITECTURE}
+EOF
+
+mkdir -p cache/indices_debian-installer
+
+cat > cache/indices_debian-installer/archive << EOF
+Dir
+{
+ ArchiveDir "binary";
+ // OverrideDir "";
+ // CacheDir "";
+ FileListDir "cache/indices_debian-installer";
+};
+
+Default
+{
+ Packages::Compress ". gzip";
+ // Packages::Extension ".deb";
+ // Sources::Extensions ".dsc";
+ // Contents::Compress "gzip";
+ // DeLinkLimit "0";
+ // FileMode "0644";
+};
+
+TreeDefault
+{
+ // MaxContentsChange
+ // ContentsAge
+ Directory "dists/\$(DIST)/\$(SECTION)/binary-\$(ARCH)/";
+ Packages "dists/\$(DIST)/\$(SECTION)/binary-\$(ARCH)/Packages";
+ InternalPrefix "dists/\$(DIST)/\$(SECTION)/";
+ Contents "dists/\$(DIST)/Contents-\$(ARCH)";
+ // Contents::Header
+ // BinCacheDB "cache.\$(DIST).\$(SECTION).\$(ARCH)";
+ // FileList "filelist.\$(DIST).\$(SECTION).\$(ARCH)";
+ FileList "filelist";
+ // BinOverride "override.\$(DIST).\$(SECTION)";
+};
+
+tree "${LIVE_DISTRIBUTION}"
+{
+ Sections "main";
+ Architectures "${LIVE_ARCHITECTURE}";
+};
+EOF
+
+cd binary
+find pool -name "*.deb" | sort > ../cache/indices_debian-installer/filelist
+cd "${OLDPWD}"
+
+cat > cache/indices_debian-installer/release << EOF
+APT::FTPArchive::Release::Origin "Debian";
+APT::FTPArchive::Release::Label "Debian";
+APT::FTPArchive::Release::Suite "${LIVE_DISTRIBUTION}";
+APT::FTPArchive::Release::Version "4.0";
+APT::FTPArchive::Release::Codename "${LIVE_DISTRIBUTION}";
+APT::FTPArchive::Release::Date "`date -R`";
+APT::FTPArchive::Release::Architectures "${LIVE_ARCHITECTURE}";
+APT::FTPArchive::Release::Components "main";
+EOF
+
+apt-ftparchive generate cache/indices_debian-installer/archive
+apt-ftparchive -c cache/indices_debian-installer/release -o APT::FTPArchive::Release::Description="Last updated: `date -R`" release binary/dists/${LIVE_DISTRIBUTION} > binary/dists/${LIVE_DISTRIBUTION}/Release
+
+mkdir binary/.disk
+echo "main" > binary/.disk/base_components
+touch binary/.disk/base_installable
+echo "not_complete" > binary/.disk/cd_type
+#echo "Debian GNU/Linux 4.0 r0 \"Etch\" - Official i386 NETINST Binary-1 20070407-11:29" > binary/.disk/info
+echo "Debian GNU/Linux ${LIVE_DISTRIBUTION} - Unofficial ${LIVE_ARCHITECTURE} NETINST Binary-1 `date +%Y%m%d-%H:%M`" > binary/.disk/info
+touch binary/.disk/mkisofs
+
+# Creating stage file
+Create_stagefile .stage/binary_debian-installer
diff --git a/helpers/lh_binary_encryption b/helpers/lh_binary_encryption
index d660b52..e404207 100755
--- a/helpers/lh_binary_encryption
+++ b/helpers/lh_binary_encryption
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
if [ -z "${LIVE_ENCRYPTION}" ]
@@ -51,6 +52,16 @@ Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
+case "${LH_INITRAMFS}" in
+ casper)
+ INITFS="casper"
+ ;;
+
+ live-initramfs)
+ INITFS="live"
+ ;;
+esac
+
case "${LIVE_FILESYSTEM}" in
ext2)
ROOTFS="ext2"
@@ -73,9 +84,9 @@ Check_package chroot/usr/bin/aespipe aespipe
Install_package
# Moving image
-mv binary/casper/filesystem.${LIVE_FILESYSTEM} chroot
+mv binary/${INITFS}/filesystem.${LIVE_FILESYSTEM} chroot
-echo "Encrypting binary/casper/filesystem.${ROOTFS} with ${LIVE_ENCRYPTION}..."
+echo "Encrypting binary/${INITFS}/filesystem.${ROOTFS} with ${LIVE_ENCRYPTION}..."
cat >> chroot/encrypt << EOF
while true
@@ -97,7 +108,7 @@ EOF
Chroot "sh encrypt"
# Move image
-mv chroot/filesystem.${LIVE_FILESYSTEM} binary/casper
+mv chroot/filesystem.${LIVE_FILESYSTEM} binary/${INITFS}
rm -f chroot/encrypt
# Removing depends
diff --git a/helpers/lh_binary_grub b/helpers/lh_binary_grub
index 894815e..35e3e48 100755
--- a/helpers/lh_binary_grub
+++ b/helpers/lh_binary_grub
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
if [ "${LIVE_BOOTLOADER}" != "grub" ]
@@ -74,10 +75,21 @@ Check_package chroot/usr/sbin/grub grub
# Installing depends
Install_package
+case "${LH_INITRAMFS}" in
+ casper)
+ INITFS="casper"
+ ;;
+
+ live-initramfs)
+ INITFS="live"
+ ;;
+esac
+
# Setting destination directory
case "${LIVE_BINARY_IMAGE}" in
- iso|usb|hdd)
- DESTDIR="binary/live"
+ iso|usb-hdd|hdd)
+ DESTDIR_LIVE="binary/live"
+ DESTDIR_INSTALL="binary/install"
;;
net)
@@ -93,17 +105,23 @@ then
if [ -n "${MULTIARCH}" ]
then
case "${LIVE_ARCHITECTURE}" in
+ amd64)
+ DESTDIR_LIVE="${DESTDIR_LIVE}.amd"
+ DESTDIR_INSTALL="${DESTDIR_INSTALL}.amd"
+ ;;
+
i386)
- DESTDIR="${DESTDIR}.386"
+ DESTDIR_LIVE="${DESTDIR_LIVE}.386"
+ DESTDIR_INSTALL="${DESTDIR_INSTALL}.386"
;;
esac
fi
fi
# Creating directory
-if [ ! -d "${DESTDIR}" ]
+if [ ! -d "${DESTDIR_LIVE}" ]
then
- mkdir -p "${DESTDIR}"
+ mkdir -p "${DESTDIR_LIVE}"
fi
# Setting boot parameters
@@ -129,8 +147,9 @@ FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=normal"
# Assembling kernel configuration
DEFAULT_FLAVOUR="`echo ${LIVE_KERNEL_FLAVOUR} | awk '{ print $1 }'`"
-LINUX="title\t\tDebian GNU/Linux - Live\nkernel\t\t/`basename ${DESTDIR}`/`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}` boot=casper LIVE_BOOTAPPEND\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'`"
-LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - Live (failsafe mode)\nkernel\t\t/`basename ${DESTDIR}`/`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}` boot=casper LIVE_BOOTAPPEND ${FAILSAFE}\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'`"
+
+LINUX="title\t\tDebian GNU/Linux - live\nkernel\t\t/`basename ${DESTDIR_LIVE}`/`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}` boot=${INITFS} LIVE_BOOTAPPEND\ninitrd\t\t/`basename ${DESTDIR_LIVE}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'`"
+LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - live (fail-safe mode)\nkernel\t\t/`basename ${DESTDIR_LIVE}`/`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}\ninitrd\t\t/`basename ${DESTDIR_LIVE}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'`"
if [ "`echo ${LIVE_KERNEL_FLAVOUR} | wc -w`" -gt "1" ]
then
@@ -138,21 +157,37 @@ then
do
if [ -z "${LINUX}" ]
then
- LINUX="title\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nkernel\t\t/`basename ${DESTDIR}`/`basename ${KERNEL}` boot=casper LIVE_BOOTAPPEND\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`"
- LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'` (failsafe mode)\nkernel\t\t/`basename ${DESTDIR}`/`basename ${KERNEL}` boot=casper LIVE_BOOTAPPEND ${FAILSAFE}\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`"
+ LINUX="title\t\tDebian GNU/Linux - live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nkernel\t\t/`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}` boot=${INITFS} LIVE_BOOTAPPEND\ninitrd\t\t/`basename ${DESTDIR_LIVE}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`"
+ LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'` (fail-safe mode)\nkernel\t\t/`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}\ninitrd\t\t/`basename ${DESTDIR_LIVE}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`"
else
- LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nkernel /`basename ${DESTDIR}`/`basename ${KERNEL}` boot=casper LIVE_BOOTAPPEND\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`"
- LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'` (failsafe mode)\nkernel /`basename ${DESTDIR}`/`basename ${KERNEL}` boot=casper LIVE_BOOTAPPEND ${FAILSAFE}\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`"
+ LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nkernel /`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}` boot=${INITFS} LIVE_BOOTAPPEND\ninitrd\t\t/`basename ${DESTDIR_LIVE}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`"
+ LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'` (fail-safe mode)\nkernel /`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}\ninitrd\t\t/`basename ${DESTDIR_LIVE}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`"
fi
done
fi
LINUX="`echo ${LINUX} | sed -e 's#//#/#g'`"
+# Assembling debian-installer configuration
+if [ "${LIVE_DEBIAN_INSTALLER}" = "enabled" ]
+then
+ LINUX="title\t\tLive:\nroot\n\n${LINUX}"
+
+ LIVE_KERNEL_INSTALL="title\t\tInstaller:\nroot"
+ LIVE_KERNEL_INSTALL="${LIVE_KERNEL_INSTALL}\n\ntitle\t\tDebian GNU/Linux - install\nkernel\t\t/`basename ${DESTDIR_INSTALL}`/vmlinuz vga=normal -- \ninitrd\t\t/`basename ${DESTDIR_INSTALL}`/initrd.gz"
+ LIVE_KERNEL_INSTALL="${LIVE_KERNEL_INSTALL}\n\ntitle\t\tDebian GNU/Linux - installgui\nkernel\t\t/`basename ${DESTDIR_INSTALL}`/vmlinuz video=vesa:ywrap,mtrr vga=788 -- \ninitrd\t\t/`basename ${DESTDIR_INSTALL}`/gtk/initrd.gz"
+ LIVE_KERNEL_INSTALL="${LIVE_KERNEL_INSTALL}\n\ntitle\t\tDebian GNU/Linux - expert\nkernel\t\t/`basename ${DESTDIR_INSTALL}`/vmlinuz priority=low vga=normal -- \ninitrd\t\t/`basename ${DESTDIR_INSTALL}`/initrd.gz"
+ LIVE_KERNEL_INSTALL="${LIVE_KERNEL_INSTALL}\n\ntitle\t\tDebian GNU/Linux - expertgui\nkernel\t\t/`basename ${DESTDIR_INSTALL}`/vmlinuz priority=low video=vesa:ywrap,mtrr vga=788\ninitrd\t\t/`basename ${DESTDIR_INSTALL}`/gtk/initrd.gz"
+ LIVE_KERNEL_INSTALL="${LIVE_KERNEL_INSTALL}\n\ntitle\t\tDebian GNU/Linux - rescue\nkernel\t\t/`basename ${DESTDIR_INSTALL}`/vmlinuz vga=normal rescue/enable=true -- \ninitrd\t\t/`basename ${DESTDIR_INSTALL}`/initrd.gz"
+ LIVE_KERNEL_INSTALL="${LIVE_KERNEL_INSTALL}\n\ntitle\t\tDebian GNU/Linux - rescuegui\nkernel\t\t/`basename ${DESTDIR_INSTALL}`/vmlinuz video=vesa:ywrap,mtrr vga=788 rescue/enable=true --\ninitrd\t\t/`basename ${DESTDIR_INSTALL}`/gtk/initrd.gz"
+ LIVE_KERNEL_INSTALL="${LIVE_KERNEL_INSTALL}\n\ntitle\t\tDebian GNU/Linux - auto\nkernel\t\t/`basename ${DESTDIR_INSTALL}`/vmlinuz auto=true priority=critical vga=normal -- \ninitrd\t\t/`basename ${DESTDIR_INSTALL}`/initrd.gz"
+ LIVE_KERNEL_INSTALL="${LIVE_KERNEL_INSTALL}\n\ntitle\t\tDebian GNU/Linux - autogui\nkernel\t\t/`basename ${DESTDIR_INSTALL}`/vmlinuz auto=true priority=critical video=vesa:ywrap,mtrr vga=788 -- \ninitrd\t\t/`basename ${DESTDIR_INSTALL}`/gtk/initrd.gz"
+fi
+
# Assembling memtest configuration
-if [ -f "${DESTDIR}"/memtest ]
+if [ -f "${DESTDIR_LIVE}"/memtest ]
then
- MEMTEST="title\t\t${LIVE_MEMTEST}\nkernel\t\t/`basename ${DESTDIR}`/memtest"
+ MEMTEST="title\t\t${LIVE_MEMTEST}\nkernel\t\t/`basename ${DESTDIR_LIVE}`/memtest"
MEMTEST="`echo ${MEMTEST} | sed -e 's#//#/#g'`"
fi
@@ -166,7 +201,7 @@ case ${LIVE_BINARY_IMAGE} in
cp chroot/usr/lib/grub/*/stage2_eltorito binary/boot/grub
;;
- usb|hdd)
+ usb-hdd|hdd)
cp chroot/usr/lib/grub/*/stage1 chroot/usr/lib/grub/*/stage2 binary/boot/grub
;;
esac
@@ -185,7 +220,7 @@ then
rm -f binary/boot/grub/splash.xpm.gz
# Removing splash entry
- sed -e "s/splashimage.*//" binary/boot/grub/menu.lst
+ sed -i -e "s/splashimage.*//" binary/boot/grub/menu.lst
else
# Overwriting splash file
cp -f "${LIVE_GRUB_SPLASH}" binary/boot/grub/splash.xpm.gz
@@ -194,8 +229,7 @@ fi
# Configure grub templates
cat >> binary/boot/grub/menu.lst << EOF
-# This is a divider, added to separate the menu items below from the Debian
-# ones.
+
title Other:
root
diff --git a/helpers/lh_binary_hdd b/helpers/lh_binary_hdd
index 545ae84..a3af088 100755
--- a/helpers/lh_binary_hdd
+++ b/helpers/lh_binary_hdd
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
diff --git a/helpers/lh_binary_includes b/helpers/lh_binary_includes
index 18ad540..15d898d 100755
--- a/helpers/lh_binary_includes
+++ b/helpers/lh_binary_includes
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
if [ "${LIVE_INCLUDES}" = "none" ]
@@ -79,17 +80,23 @@ esac
if [ "${LIVE_DEBIAN_INSTALLER}" = "enabled" ]
then
+ # Working arround vfat limitations
+ if [ "${LIVE_BINARY_IMAGE}" = "usb-hdd" ]
+ then
+ CP_OPTIONS="--preserve=link,mode,timestamps"
+ fi
+
# Copying d-i templates
if [ -d "${LIVE_INCLUDES}"/"${LIVE_DISTRIBUTION}"/install ] && \
ls "${LIVE_INCLUDES}"/"${LIVE_DISTRIBUTION}"/install/* &> /dev/null
then
- cp -r "${LIVE_INCLUDES}"/"${LIVE_DISTRIBUTION}"/install/* binary
+ cp -r ${CP_OPTIONS} "${LIVE_INCLUDES}"/"${LIVE_DISTRIBUTION}"/install/* binary
fi
if [ -d "${LIVE_INCLUDES}"/"${LIVE_DISTRIBUTION}"/install."${ARCH}" ] && \
ls "${LIVE_INCLUDES}"/"${LIVE_DISTRIBUTION}"/install."${ARCH}"/* &> /dev/null
then
- cp -r "${LIVE_INCLUDES}"/"${LIVE_DISTRIBUTION}"/install."${ARCH}"/* binary
+ cp -r ${CP_OPTIONS} "${LIVE_INCLUDES}"/"${LIVE_DISTRIBUTION}"/install."${ARCH}"/* binary
fi
# Adjusting d-i templates
@@ -105,8 +112,8 @@ then
DEBIAN_TOOLS_TXT="/tools/"
fi
- sed -i -e "s/DEBIAN_NAME/${DEBIAN_NAME}/g" -e "s/DEBIAN_DATE/${DEBIAN_DATE}/g" -e "s/DEBIAN_TOOLS/${DEBIAN_TOOLS_HTML}/g" binary/README.html
- sed -i -e "s/DEBIAN_NAME/${DEBIAN_NAME}/g" -e "s/DEBIAN_DATE/${DEBIAN_DATE}/g" -e "s/DEBIAN_TOOLS/${DEBIAN_TOOLS_TXT}/g" binary/README.txt
+ sed -i -e "s/DEBIAN_NAME/${DEBIAN_NAME}/g" -e "s/DEBIAN_DATE/${DEBIAN_DATE}/g" -e "s#DEBIAN_TOOLS#${DEBIAN_TOOLS_HTML}#g" binary/README.html
+ sed -i -e "s/DEBIAN_NAME/${DEBIAN_NAME}/g" -e "s/DEBIAN_DATE/${DEBIAN_DATE}/g" -e "s#DEBIAN_TOOLS#${DEBIAN_TOOLS_TXT}#g" binary/README.txt
fi
# Creating stage file
diff --git a/helpers/lh_binary_iso b/helpers/lh_binary_iso
index b22b3b4..a949ff6 100755
--- a/helpers/lh_binary_iso
+++ b/helpers/lh_binary_iso
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
for IMAGE in ${LIVE_BINARY_IMAGE}
@@ -63,7 +64,7 @@ do
if [ "${LH_VERBOSE}" = "enabled" ]
then
- GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -i"
+ GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -v"
fi
# Moving image
@@ -74,19 +75,19 @@ do
then
case "${LIVE_BOOTLOADER}" in
grub)
- Chroot "${LH_GENISOIMAGE} ${GENISOIMAGE_OPTIONS} -o binary.iso -r -J -l -b boot/grub/stage2_eltorito -m boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table binary"
+ Chroot "${LH_GENISOIMAGE} ${GENISOIMAGE_OPTIONS} -o binary.iso -r -J -l -cache-inodes -b boot/grub/stage2_eltorito -m boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table binary"
;;
syslinux)
- #Chroot "${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 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 binary"
- Chroot "${LH_GENISOIMAGE} ${GENISOIMAGE_OPTIONS} -o binary.iso -r -J -l -b isolinux/isolinux.bin -m isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table binary"
+ #Chroot "${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 binary.iso -r -J -l -V \"${LIVE_ISO_VOLUME}\" -cache-inodes -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table binary"
+ Chroot "${LH_GENISOIMAGE} ${GENISOIMAGE_OPTIONS} -o binary.iso -r -J -l -cache-inodes -b isolinux/isolinux.bin -m isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table binary"
;;
esac
else
Echo_warning "Bootloader on your architecture not yet supported (Continuing in 5 seconds)."
sleep 5
#Chroot "${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 binary.iso -r -J -l -V \"${LIVE_ISO_VOLUME}\" binary"
- Chroot "${LH_GENISOIMAGE} ${GENISOIMAGE} -o binary.iso -r -J -l binary"
+ Chroot "${LH_GENISOIMAGE} ${GENISOIMAGE} -o binary.iso -r -J -l binary -cache-inodes"
fi
# Move image
diff --git a/helpers/lh_binary_linuximage b/helpers/lh_binary_linuximage
index 600aeaa..629ef77 100755
--- a/helpers/lh_binary_linuximage
+++ b/helpers/lh_binary_linuximage
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "binary_linuximage: Init"
@@ -58,7 +59,7 @@ case "${LIVE_BINARY_IMAGE}" in
DESTDIR="tftpboot"
;;
- usb|hdd)
+ usb-hdd|hdd)
DESTDIR="binary"
;;
esac
@@ -70,9 +71,17 @@ then
if [ -n "${MULTIARCH}" ]
then
case "${LIVE_ARCHITECTURE}" in
+ amd64)
+ DESTDIR="${DESTDIR}.amd"
+ ;;
+
i386)
DESTDIR="${DESTDIR}.386"
;;
+
+ powerpc)
+ DESTDIR="${DESTDIR}.ppc"
+ ;;
esac
fi
fi
diff --git a/helpers/lh_binary_localincludes b/helpers/lh_binary_localincludes
index dcbaa2c..2c1f752 100755
--- a/helpers/lh_binary_localincludes
+++ b/helpers/lh_binary_localincludes
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "binary_localincludes: Init"
diff --git a/helpers/lh_binary_manifest b/helpers/lh_binary_manifest
index f8c3899..87883c3 100755
--- a/helpers/lh_binary_manifest
+++ b/helpers/lh_binary_manifest
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "binary_manifest: Init"
@@ -45,8 +46,18 @@ Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
+case "${LH_INITRAMFS}" in
+ casper)
+ INITFS="casper"
+ ;;
+
+ live-initramfs)
+ INITFS="live"
+ ;;
+esac
+
# Add filesystem.manifest
-Chroot "dpkg --get-selections" | awk '{ print $1 }' | sort -u > binary/casper/filesystem.manifest
+Chroot "dpkg --get-selections" | awk '{ print $1 }' | sort -u > binary/${INITFS}/filesystem.manifest
# Add packages.list
Chroot "dpkg -l" > packages.txt
diff --git a/helpers/lh_binary_md5sum b/helpers/lh_binary_md5sum
index 59864ce..8964593 100755
--- a/helpers/lh_binary_md5sum
+++ b/helpers/lh_binary_md5sum
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "binary_md5sum: Init"
diff --git a/helpers/lh_binary_memtest b/helpers/lh_binary_memtest
index ea07422..edf3830 100755
--- a/helpers/lh_binary_memtest
+++ b/helpers/lh_binary_memtest
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
if [ "${LIVE_MEMTEST}" = "disabled" ]
@@ -80,7 +81,7 @@ case "${LIVE_BINARY_IMAGE}" in
DESTDIR="tftpboot"
;;
- usb|hdd)
+ usb-hdd|hdd)
DESTDIR="binary"
;;
esac
@@ -92,6 +93,10 @@ then
if [ -n "${MULTIARCH}" ]
then
case "${LIVE_ARCHITECTURE}" in
+ amd64)
+ DESTDIR="${DESTDIR}.amd"
+ ;;
+
i386)
DESTDIR="${DESTDIR}.386"
;;
diff --git a/helpers/lh_binary_net b/helpers/lh_binary_net
index f07e5e6..47ed7d2 100755
--- a/helpers/lh_binary_net
+++ b/helpers/lh_binary_net
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "binary_net: Init"
diff --git a/helpers/lh_binary_rootfs b/helpers/lh_binary_rootfs
index 12ac0bb..ce93038 100755
--- a/helpers/lh_binary_rootfs
+++ b/helpers/lh_binary_rootfs
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "binary_rootfs: Init"
@@ -46,10 +47,20 @@ Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
+case "${LH_INITRAMFS}" in
+ casper)
+ INITFS="casper"
+ ;;
+
+ live-initramfs)
+ INITFS="live"
+ ;;
+esac
+
# Creating directory
-if [ ! -d binary/casper ]
+if [ ! -d binary/${INITFS} ]
then
- mkdir -p binary/casper
+ mkdir -p binary/${INITFS}
fi
case "${LIVE_FILESYSTEM}" in
@@ -61,9 +72,9 @@ case "${LIVE_FILESYSTEM}" in
Install_package
# Remove old ext2 image
- if [ -f binary/casper/filesystem.ext2 ]
+ if [ -f binary/${INITFS}/filesystem.ext2 ]
then
- rm -f binary/casper/filesystem.ext2
+ rm -f binary/${INITFS}/filesystem.ext2
fi
DU_DIM="`du -ks chroot | cut -f1`"
@@ -72,7 +83,7 @@ case "${LIVE_FILESYSTEM}" in
Chroot "genext2fs --size-in-blocks=${REAL_DIM} --reserved-blocks=0 --root=chroot filesystem.ext2"
# Move image
- mv chroot/filesystem.ext2 binary/casper
+ mv chroot/filesystem.ext2 binary/${INITFS}
rm -rf chroot/chroot
# Removing depends
@@ -80,12 +91,12 @@ case "${LIVE_FILESYSTEM}" in
;;
plain)
- if [ -d binary/casper/filesystem.dir ]
+ if [ -d binary/${INITFS}/filesystem.dir ]
then
- rm -rf binary/casper/filesystem.dir
+ rm -rf binary/${INITFS}/filesystem.dir
fi
- mv chroot/chroot binary/casper/filesystem.dir
+ mv chroot/chroot binary/${INITFS}/filesystem.dir
;;
squashfs)
@@ -96,12 +107,12 @@ case "${LIVE_FILESYSTEM}" in
Install_package
# Remove old squashfs image
- if [ -f binary/casper/filesystem.squashfs ]
+ if [ -f binary/${INITFS}/filesystem.squashfs ]
then
- rm -f binary/casper/filesystem.squashfs
+ rm -f binary/${INITFS}/filesystem.squashfs
fi
- if [ "${LH_QUIET}" = "enabled" ]
+ if [ "${LH_QUIET}" = "enabled" ] && [ "${LIVE_DISTRIBUTION}" != "etch" ] && [ "${LIVE_DISTRIBUTION}" != "testing" ]
then
MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -no-progress"
fi
@@ -120,12 +131,12 @@ case "${LIVE_FILESYSTEM}" in
fi
# Move image
- ${LH_ROOT_COMMAND} mv chroot/filesystem.squashfs binary/casper
+ ${LH_ROOT_COMMAND} mv chroot/filesystem.squashfs binary/${INITFS}
${LH_ROOT_COMMAND} rm -rf chroot/chroot
if [ -n "${LH_ROOT_COMMAND}" ]
then
- ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` binary/casper
+ ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` binary/${INITFS}
fi
# Removing depends
diff --git a/helpers/lh_binary_syslinux b/helpers/lh_binary_syslinux
index 6864f32..4ca6408 100755
--- a/helpers/lh_binary_syslinux
+++ b/helpers/lh_binary_syslinux
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
if [ "${LIVE_BOOTLOADER}" != "syslinux" ]
@@ -74,18 +75,31 @@ Check_package chroot/usr/bin/syslinux syslinux
# Installing depends
Install_package
+case "${LH_INITRAMFS}" in
+ casper)
+ INITFS="casper"
+ ;;
+
+ live-initramfs)
+ INITFS="live"
+ ;;
+esac
+
# Setting destination directory
case "${LIVE_BINARY_IMAGE}" in
iso)
- DESTDIR="binary/live"
+ DESTDIR_LIVE="binary/live"
+ DESTDIR_INSTALL="binary/install"
;;
net)
- DESTDIR="tftpboot"
+ DESTDIR_LIVE="tftpboot"
+ DESTDIR_INSTALL="tftpboot"
;;
- usb|hdd)
- DESTDIR="binary"
+ usb-hdd|hdd)
+ DESTDIR_LIVE="binary"
+ DESTDIR_INSTALL="binary"
;;
esac
@@ -96,17 +110,23 @@ then
if [ -n "${MULTIARCH}" ]
then
case "${LIVE_ARCHITECTURE}" in
+ amd64)
+ DESTDIR_LIVE="${DESTDIR_LIVE}.amd"
+ DESTDIR_INSTALL="${DESTDIR_INSTALL}.amd"
+ ;;
+
i386)
- DESTDIR="${DESTDIR}.386"
+ DESTDIR_LIVE="${DESTDIR_LIVE}.386"
+ DESTDIR_INSTALL="${DESTDIR_INSTALL}.386"
;;
esac
fi
fi
# Creating directory
-if [ ! -d "${DESTDIR}" ]
+if [ ! -d "${DESTDIR_LIVE}" ]
then
- mkdir -p "${DESTDIR}"
+ mkdir -p "${DESTDIR_LIVE}"
fi
# Setting boot parameters
@@ -134,12 +154,12 @@ FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=normal"
if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
then
DEFAULT_FLAVOUR="`echo ${LIVE_KERNEL_FLAVOUR} | awk '{ print $1 }'`"
- LINUX="label live\n kernel /`basename ${DESTDIR}`/`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n append initrd=/`basename ${DESTDIR}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
- LINUX="${LINUX}\n\nlabel live-failsafe\n kernel /`basename ${DESTDIR}`/`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n append initrd=/`basename ${DESTDIR}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND ${FAILSAFE}"
+ LINUX="LABEL live\n\tkernel /`basename ${DESTDIR_LIVE}`/`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n\tappend initrd=/`basename ${DESTDIR_LIVE}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND"
+ LINUX="${LINUX}\n\nLABEL live-failsafe\n\tkernel /`basename ${DESTDIR_LIVE}`/`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n\tappend initrd=/`basename ${DESTDIR_LIVE}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}"
else
DEFAULT_FLAVOUR="`echo ${LIVE_KERNEL_FLAVOUR} | awk '{ print $1 }'`"
- LINUX="label live\n kernel `basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n append initrd=initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
- LINUX="${LINUX}\n\nlabel live-failsafe\n kernel `basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n append initrd=initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND ${FAILSAFE}"
+ LINUX="LABEL live\n\tkernel `basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n\tappend initrd=initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND"
+ LINUX="${LINUX}\n\nLABEL live-failsafe\n\tkernel `basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n\tappend initrd=initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}"
fi
if [ "`echo ${LIVE_KERNEL_FLAVOUR} | wc -w`" -gt "1" ]
@@ -150,20 +170,20 @@ then
then
if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
then
- LINUX="label live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n kernel /`basename ${DESTDIR}`/`basename ${KERNEL}`\n append initrd=/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
- LINUX="${LINUX}\n\nlabel live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`-failsafe\n kernel /`basename ${DESTDIR}`/`basename ${KERNEL}`\n append initrd=/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND ${FAILSAFE}"
+ LINUX="LABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n\tkernel /`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}`\n\tappend initrd=/`basename ${DESTDIR_LIVE}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND"
+ LINUX="${LINUX}\n\nLABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`-failsafe\n\tkernel /`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}`\n\tappend initrd=/`basename ${DESTDIR_LIVE}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}"
else
- LINUX="label live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n kernel `basename ${KERNEL}`\n append initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper live_BOOTAPPEND"
- LINUX="${LINUX}\n\nlabel live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n kernel `basename ${KERNEL}`\n append initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND ${FAILSAFE}"
+ LINUX="LABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n\tkernel `basename ${KERNEL}`\n\tappend initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} live_BOOTAPPEND"
+ LINUX="${LINUX}\n\nLABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n\tkernel `basename ${KERNEL}`\n\tappend initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}"
fi
else
if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
then
- LINUX="${LINUX}\n\nlabel live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n kernel /`basename ${DESTDIR}`/`basename ${KERNEL}`\n append initrd=/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
- LINUX="${LINUX}\n\nlabel live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`-failsafe\n kernel /`basename ${DESTDIR}`/`basename ${KERNEL}`\n append initrd=/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND ${FAILSAFE}"
+ LINUX="${LINUX}\n\nLABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n\tkernel /`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}`\n\tappend initrd=/`basename ${DESTDIR_LIVE}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND"
+ LINUX="${LINUX}\n\nLABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`-failsafe\n\tkernel /`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}`\n\tappend initrd=/`basename ${DESTDIR_LIVE}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}"
else
- LINUX="${LINUX}\n\nlabel live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n kernel `basename ${KERNEL}`\n append initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
- LINUX="${LINUX}\n\nlabel live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n kernel `basename ${KERNEL}`\n append initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND ${FAILSAFE}"
+ LINUX="${LINUX}\n\nLABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n\tkernel `basename ${KERNEL}`\n\tappend initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND"
+ LINUX="${LINUX}\n\nLABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n\tkernel `basename ${KERNEL}`\n\tappend initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}"
fi
fi
done
@@ -172,15 +192,29 @@ fi
# Removing '//'
LINUX="`echo ${LINUX} | sed -e 's#//#/#g'`"
+# Assembling debian-installer configuration
+if [ "${LIVE_DEBIAN_INSTALLER}" = "enabled" ]
+then
+ LIVE_KERNEL_INSTALL="LABEL install\n\tkernel /`basename ${DESTDIR_INSTALL}`/vmlinuz\n\tappend vga=normal initrd=/`basename ${DESTDIR_INSTALL}`/initrd.gz -- "
+ LIVE_KERNEL_INSTALL="${LIVE_KERNEL_INSTALL}\n\nLABEL linux\n\tkernel /`basename ${DESTDIR_INSTALL}`/vmlinuz\n\tappend vga=normal initrd=/`basename ${DESTDIR_INSTALL}`/initrd.gz -- \n\n"
+ LIVE_KERNEL_INSTALL="${LIVE_KERNEL_INSTALL}\n\nLABEL installgui\n\tkernel /`basename ${DESTDIR_INSTALL}`/vmlinuz\n\tappend video=vesa:ywrap,mtrr vga=788 initrd=/`basename ${DESTDIR_INSTALL}`/gtk/initrd.gz -- "
+ LIVE_KENREL_INSTALL="${LIVE_KERNEL_INSTALL}\n\nLABEL expert\n\tkernel /`basename ${DESTDIR_INSTALL}`/vmlinuz\n\tappend priority=low vga=normal initrd=/`basename ${DESTDIR_INSTALL}`/initrd.gz -- "
+ LIVE_KERNEL_INSTALL="${LIVE_KERNEL_INSTALL}\n\nLABEL expertgui\n\tkernel /`basename ${DESTDIR_INSTALL}`/vmlinuz\n\tappend priority=low video=vesa:ywrap,mtrr vga=788 initrd=/`basename ${DESTDIR_INSTALL}`/gtk/initrd.gz -- "
+ LIVE_KERNEL_INSTALL="${LIVE_KERNEL_INSTALL}\n\nLABEL rescue\n\tkernel /`basename ${DESTDIR_INSTALL}`/vmlinuz\n\tappend vga=normal initrd=/`basename ${DESTDIR_INSTALL}`/initrd.gz rescue/enable=true -- "
+ LIVE_KERNEL_INSTALL="${LIVE_KERNEL_INSTALL}\n\nLABEL rescuegui\n\tkernel /`basename ${DESTDIR_INSTALL}`/vmlinuz\n\tappend video=vesa:ywrap,mtrr vga=788 initrd=/`basename ${DESTDIR_INSTALL}`/gtk/initrd.gz rescue/enable=true -- "
+ LIVE_KERNEL_INSTALL="${LIVE_KERNEL_INSTALL}\n\nLABEL auto\n\tkernel /`basename ${DESTDIR_INSTALL}`/vmlinuz\n\tappend auto=true priority=critical vga=normal initrd=/`basename ${DESTDIR_INSTALL}`/initrd.gz -- "
+ LIVE_KERNEL_INSTALL="${LIVE_KERNEL_INSTALL}\n\nLABEL autogui\n\tkernel /`basename ${DESTDIR_INSTALL}`/vmlinuz\n\tappend auto=true priority=critical video=vesa:ywrap,mtrr vga=788 initrd=/`basename ${DESTDIR_INSTALL}`/gtk/initrd.gz -- "
+fi
+
# Assembling memtest configuration
-if [ -f "${DESTDIR}"/memtest ]
+if [ -f "${DESTDIR_LIVE}"/memtest ]
then
if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
then
- MEMTEST="label memtest\n kernel /`basename ${DESTDIR}`/memtest"
+ MEMTEST="LABEL memtest\n\tkernel /`basename ${DESTDIR_LIVE}`/memtest"
MEMTEST="`echo ${MEMTEST} | sed -e 's#//#/#g'`"
else
- MEMTEST="label memtest\n kernel memtest"
+ MEMTEST="LABEL memtest\n\tkernel memtest"
fi
fi
@@ -202,7 +236,7 @@ case "${LIVE_BINARY_IMAGE}" in
if [ "${LIVE_SYSLINUX_SPLASH}" = "none" ]
then
rm -f binary/isolinux/splash.rle
- sed -e "s/.*splash.*//" binary/isolinux/isolinux.txt
+ sed -e "s/.*splash.*//" binary/isolinux/boot.txt
else
cp -f "${LIVE_SYSLINUX_SPLASH}" binary/isolinux/splash.rle
fi
@@ -224,13 +258,13 @@ case "${LIVE_BINARY_IMAGE}" in
do
NUMBER=$(($NUMBER + 1))
- mv "${DESTDIR}"/vmlinuz-*-${FLAVOUR} "${DESTDIR}"/vmlinuz${NUMBER}
- mv "${DESTDIR}"/initrd.img-*-${FLAVOUR} "${DESTDIR}"/initrd${NUMBER}.img
+ mv "${DESTDIR_LIVE}"/vmlinuz-*-${FLAVOUR} "${DESTDIR_LIVE}"/vmlinuz${NUMBER}
+ mv "${DESTDIR_LIVE}"/initrd.img-*-${FLAVOUR} "${DESTDIR_LIVE}"/initrd${NUMBER}.img
sed -i -e "s/vmlinuz-.*-${FLAVOUR}/vmlinuz${NUMBER}/g" -e "s/initrd.img-.*-${FLAVOUR}/initrd${NUMBER}.img/g" binary/isolinux/isolinux.cfg
done
else
- mv "${DESTDIR}"/vmlinuz-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR}"/vmlinuz
- mv "${DESTDIR}"/initrd.img-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR}"/initrd.img
+ mv "${DESTDIR_LIVE}"/vmlinuz-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR_LIVE}"/vmlinuz
+ mv "${DESTDIR_LIVE}"/initrd.img-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR_LIVE}"/initrd.img
sed -i -e "s/vmlinuz-.*-${LIVE_KERNEL_FLAVOUR}/vmlinuz/g" -e "s/initrd.img-.*-${LIVE_KERNEL_FLAVOUR}/initrd.img/g" binary/isolinux/isolinux.cfg
fi
;;
@@ -243,7 +277,7 @@ case "${LIVE_BINARY_IMAGE}" in
mkdir -p tftpboot/pxelinux.cfg
cp -r "${LIVE_TEMPLATES}"/syslinux/* tftpboot/pxelinux.cfg
mv tftpboot/pxelinux.cfg/pxelinux.cfg tftpboot/pxelinux.cfg/default
- sed -i -e 's#splash.rle#pxelinux.cfg/splash.rle#' tftpboot/pxelinux.cfg/isolinux.txt
+ sed -i -e 's#splash.rle#pxelinux.cfg/splash.rle#' tftpboot/pxelinux.cfg/boot.txt
# Copying splash screen
if [ -f config/binary_syslinux/splash.rle ]
@@ -256,7 +290,7 @@ case "${LIVE_BINARY_IMAGE}" in
if [ "${LIVE_SYSLINUX_SPLASH}" = "none" ]
then
rm -f tftpboot/pxelinux.cfg/splash.rle
- sed -e "s/.*splash.*//" tftpboot/pxelinux.cfg/isolinux.txt
+ sed -e "s/.*splash.*//" tftpboot/pxelinux.cfg/boot.txt
else
cp -f "${LIVE_SYSLINUX_SPLASH}" tftpboot/pxelinux.cfg/splash.rle
fi
@@ -278,25 +312,23 @@ case "${LIVE_BINARY_IMAGE}" in
do
NUMBER=$(($NUMBER + 1))
- mv "${DESTDIR}"/vmlinuz-*-${FLAVOUR} "${DESTDIR}"/vmlinuz${NUMBER}
- mv "${DESTDIR}"/initrd.img-*-${FLAVOUR} "${DESTDIR}"/initrd${NUMBER}.img
+ mv "${DESTDIR_LIVE}"/vmlinuz-*-${FLAVOUR} "${DESTDIR_LIVE}"/vmlinuz${NUMBER}
+ mv "${DESTDIR_LIVE}"/initrd.img-*-${FLAVOUR} "${DESTDIR_LIVE}"/initrd${NUMBER}.img
sed -i -e "s/vmlinuz-.*-${FLAVOUR}/vmlinuz${NUMBER}/g" -e "s/initrd.img-.*-${FLAVOUR}/initrd${NUMBER}.img/g" binary/isolinux/isolinux.cfg
done
else
- mv "${DESTDIR}"/vmlinuz-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR}"/vmlinuz
- mv "${DESTDIR}"/initrd.img-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR}"/initrd.img
+ mv "${DESTDIR_LIVE}"/vmlinuz-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR_LIVE}"/vmlinuz
+ mv "${DESTDIR_LIVE}"/initrd.img-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR_LIVE}"/initrd.img
sed -i -e "s/vmlinuz-.*-${LIVE_KERNEL_FLAVOUR}/vmlinuz/g" -e "s/initrd.img-.*-${LIVE_KERNEL_FLAVOUR}/initrd.img/g" binary/isolinux/isolinux.cfg
fi
;;
- usb|hdd)
+ usb-hdd|hdd)
# Copying syslinux
mkdir -p binary
cp chroot/usr/lib/syslinux/isolinux.bin binary/syslinux.bin
cp -r "${LIVE_TEMPLATES}"/syslinux/* binary
mv binary/isolinux.cfg binary/syslinux.cfg
- mv binary/isolinux.txt binary/syslinux.txt
- sed -i -e "s/isolinux.txt/syslinux.txt/" binary/syslinux.cfg
# Copying splash screen
if [ -f config/binary_syslinux/splash.rle ]
@@ -331,13 +363,13 @@ case "${LIVE_BINARY_IMAGE}" in
do
NUMBER=$(($NUMBER + 1))
- mv "${DESTDIR}"/vmlinuz-*-${FLAVOUR} "${DESTDIR}"/vmlinuz${NUMBER}
- mv "${DESTDIR}"/initrd.img-*-${FLAVOUR} "${DESTDIR}"/initrd${NUMBER}.img
+ mv "${DESTDIR_LIVE}"/vmlinuz-*-${FLAVOUR} "${DESTDIR_LIVE}"/vmlinuz${NUMBER}
+ mv "${DESTDIR_LIVE}"/initrd.img-*-${FLAVOUR} "${DESTDIR_LIVE}"/initrd${NUMBER}.img
sed -i -e "s/vmlinuz-.*-${FLAVOUR}/vmlinuz${NUMBER}/g" -e "s/initrd.img-.*-${FLAVOUR}/initrd${NUMBER}.img/g" binary/syslinux.cfg
done
else
- mv "${DESTDIR}"/vmlinuz-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR}"/vmlinuz
- mv "${DESTDIR}"/initrd.img-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR}"/initrd.img
+ mv "${DESTDIR_LIVE}"/vmlinuz-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR_LIVE}"/vmlinuz
+ mv "${DESTDIR_LIVE}"/initrd.img-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR_LIVE}"/initrd.img
sed -i -e "s/vmlinuz-.*-${LIVE_KERNEL_FLAVOUR}/vmlinuz/g" -e "s/initrd.img-.*-${LIVE_KERNEL_FLAVOUR}/initrd.img/g" binary/syslinux.cfg
fi
;;
diff --git a/helpers/lh_binary_usb b/helpers/lh_binary_usb-hdd
index e0c0193..8a8f144 100755
--- a/helpers/lh_binary_usb
+++ b/helpers/lh_binary_usb-hdd
@@ -1,6 +1,6 @@
#!/bin/sh
-# lh_binary_usb(1) - build binary image
+# lh_binary_usb-hdd(1) - build binary image
# Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org>
#
# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@@ -25,24 +25,25 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
-Breakpoint "binary_usb: Init"
+Breakpoint "binary_usb-hdd: Init"
for IMAGE in ${LIVE_BINARY_IMAGE}
do
- if [ "${IMAGE}" = "usb" ]
+ if [ "${IMAGE}" = "usb-hdd" ]
then
# Requiring stage file
Require_stagefile .stage/bootstrap
Require_stagefile .stage/chroot_proc
# Checking stage file
- Check_stagefile .stage/binary_usb
+ Check_stagefile .stage/binary_usb-hdd
# Checking lock file
Check_lockfile .lock
@@ -116,7 +117,7 @@ do
FREELO="`${LH_LOSETUP} -f`"
lh_losetup $FREELO binary.img 1
- Chroot "mkfs.msdos -n DEBIAN_LIVE ${FREELO}"
+ Chroot " mkfs.vfat -F 16 -n DEBIAN_LIVE ${FREELO}"
mkdir -p binary.tmp
${LH_ROOT_COMMAND} mount ${FREELO} binary.tmp
cp -r binary/* binary.tmp
@@ -152,6 +153,6 @@ do
Remove_package
# Creating stage file
- Create_stagefile .stage/binary_usb
+ Create_stagefile .stage/binary_usb-hdd
fi
done
diff --git a/helpers/lh_binary_yaboot b/helpers/lh_binary_yaboot
index e4a1b65..7f82d40 100755
--- a/helpers/lh_binary_yaboot
+++ b/helpers/lh_binary_yaboot
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
if [ "${LIVE_BOOTLOADER}" != "yaboot" ]
@@ -74,13 +75,23 @@ Check_package chroot/usr/lib/yaboot/yaboot yaboot
# Installing depends
Install_package
+case "${LH_INITRAMFS}" in
+ casper)
+ INITFS="casper"
+ ;;
+
+ live-initramfs)
+ INITFS="live"
+ ;;
+esac
+
# Setting destination directory
case "${LIVE_BINARY_IMAGE}" in
iso)
DESTDIR="binary/live"
;;
- net|usb|hdd)
+ net|usb-hdd|hdd)
Echo_error "not supported, FIXME"
;;
esac
@@ -123,10 +134,10 @@ LIVE_BOOTAPPEND="`echo ${LIVE_BOOTAPPEND} | sed -e 's/ //'`"
if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
then
DEFAULT_FLAVOUR="`echo ${LIVE_KERNEL_FLAVOUR} | awk '{ print $1 }'`"
- LINUX="image=/`basename ${DESTDIR}`/`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n\tinitrd=/`basename ${DESTDIR}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'`\n\tlabel=LIVE\n\tappend=\"boot=casper LIVE_BOOTAPPEND\"\n\tinitrd-size=1048576\n\tread-only"
+ LINUX="image=/`basename ${DESTDIR}`/`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n\tinitrd=/`basename ${DESTDIR}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'`\n\tlabel=LIVE\n\tappend=\"boot=${INITFS} LIVE_BOOTAPPEND\"\n\tinitrd-size=1048576\n\tread-only"
else
DEFAULT_FLAVOUR="`echo ${LIVE_KERNEL_FLAVOUR} | awk '{ print $1 }'`"
- LINUX="image=`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n\tinitrd=initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'`\n\tlabel=LIVE\n\tappend=\"boot=casper LIVE_BOOTAPPEND\"\n\tinitrd-size=1048576\n\tread-only"
+ LINUX="image=`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n\tinitrd=initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'`\n\tlabel=LIVE\n\tappend=\"boot=${INITFS} LIVE_BOOTAPPEND\"\n\tinitrd-size=1048576\n\tread-only"
fi
# FIXME
@@ -138,16 +149,16 @@ then
then
if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
then
- LINUX="label LIVE-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n kernel /`basename ${DESTDIR}`/`basename ${KERNEL}`\n append initrd=/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
+ LINUX="label LIVE-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n kernel /`basename ${DESTDIR}`/`basename ${KERNEL}`\n append initrd=/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND"
else
- LINUX="label LIVE-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n kernel `basename ${KERNEL}`\n append initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
+ LINUX="label LIVE-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n kernel `basename ${KERNEL}`\n append initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND"
fi
else
if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
then
- LINUX="${LINUX}\nlabel LIVE-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n kernel /`basename ${DESTDIR}`/`basename ${KERNEL}`\n append initrd=/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
+ LINUX="${LINUX}\nlabel LIVE-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n kernel /`basename ${DESTDIR}`/`basename ${KERNEL}`\n append initrd=/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND"
else
- LINUX="${LINUX}\nlabel LIVE-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n kernel `basename ${KERNEL}`\n append initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
+ LINUX="${LINUX}\nlabel LIVE-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n kernel `basename ${KERNEL}`\n append initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND"
fi
fi
done
diff --git a/helpers/lh_bootstrap b/helpers/lh_bootstrap
index 2692a56..733fad3 100755
--- a/helpers/lh_bootstrap
+++ b/helpers/lh_bootstrap
@@ -30,10 +30,11 @@ Echo_debug "Init ${PROGRAM}"
Breakpoint "bootstrap: Init"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
# Bootstrapping system
diff --git a/helpers/lh_bootstrap_cdebootstrap b/helpers/lh_bootstrap_cdebootstrap
index 7aa2ea4..cc7ffca 100755
--- a/helpers/lh_bootstrap_cdebootstrap
+++ b/helpers/lh_bootstrap_cdebootstrap
@@ -28,10 +28,11 @@ lh_testroot
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "bootstrap_cdeboostrap: Init"
@@ -91,12 +92,12 @@ fi
if [ -x "/usr/bin/cdebootstrap" ]
then
- if [ "${LH_CACHE}" = "enabled" ]
- then
- # Restore old cache
- if [ -d cache/chroot_bootstrap ]
+ for STAGE in ${LH_CACHE_STAGES}
+ do
+ if [ "${STAGE}" = "bootstrap" ] && [ -d cache/stages_bootstrap ]
then
- ${LH_ROOT_COMMAND} cp -a cache/chroot_bootstrap/* chroot
+ # Restore old cache
+ ${LH_ROOT_COMMAND} cp -a cache/stages_bootstrap/* chroot
if [ -n "${LH_ROOT_COMMAND}" ]
then
@@ -108,11 +109,14 @@ then
exit 0
fi
+ done
- if [ -d cache/bootstrap ]
+ if [ "${LH_CACHE_PACKAGES}" = "enabled" ]
+ then
+ if [ -d cache/packages_bootstrap ]
then
mkdir -p chroot/var/cache/bootstrap
- cp cache/bootstrap/*.deb chroot/var/cache/bootstrap
+ cp cache/packages_bootstrap/*.deb chroot/var/cache/bootstrap
fi
# Executing cdebootstrap (download-only)
@@ -124,18 +128,18 @@ then
fi
# Removing old cache
- if [ -d cache/bootstrap ]
+ if [ -d cache/packages_bootstrap ]
then
- rm -f cache/bootstrap/*.deb
+ rm -f cache/packages_bootstrap/*.deb
fi
# Saving new cache
- if [ ! -d cache/bootstrap ]
+ if [ ! -d cache/packages_bootstrap ]
then
- mkdir -p cache/bootstrap
+ mkdir -p cache/packages_bootstrap
fi
- cp chroot/var/cache/bootstrap/*.deb cache/bootstrap
+ cp chroot/var/cache/bootstrap/*.deb cache/packages_bootstrap
fi
# Executing cdebootstrap (regular run)
@@ -158,26 +162,26 @@ then
rm -f chroot/etc/resolv.conf
# Removing bootstrap cache
- if [ -d chroot/var/cache/bootstrap ]
- then
- rm -rf chroot/var/cache/bootstrap
- fi
+ rm -rf chroot/var/cache/bootstrap
# Saving new cache
- if [ "${LH_CACHE}" = "enabled" ]
- then
- if [ -d cache/chroot_bootstrap ]
+ for STAGE in ${LH_CACHE_STAGES}
+ do
+ if [ "${STAGE}" = "bootstrap" ]
then
- rm -rf cache/chroot_bootstrap
- fi
+ if [ -d cache/stages_bootstrap ]
+ then
+ rm -rf cache/stages_bootstrap
+ fi
- ${LH_ROOT_COMMAND} cp -a chroot cache/chroot_bootstrap
+ ${LH_ROOT_COMMAND} cp -a chroot cache/stages_bootstrap
- if [ -n "${LH_ROOT_COMMAND}" ]
- then
- ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` cache/chroot_bootstrap
+ if [ -n "${LH_ROOT_COMMAND}" ]
+ then
+ ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` cache/stages_bootstrap
+ fi
fi
- fi
+ done
# Creating stage file
Create_stagefile .stage/bootstrap
diff --git a/helpers/lh_bootstrap_debootstrap b/helpers/lh_bootstrap_debootstrap
index 43fdd96..0538422 100755
--- a/helpers/lh_bootstrap_debootstrap
+++ b/helpers/lh_bootstrap_debootstrap
@@ -28,10 +28,11 @@ lh_testroot
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "bootstrap_debootstrap: Init"
@@ -74,12 +75,12 @@ fi
if [ -x "/usr/sbin/debootstrap" ]
then
- if [ "${LH_CACHE}" = "enabled" ]
- then
- # Restore old cache
- if [ -d cache/chroot_bootstrap ]
+ for STAGE in ${LH_CACHE_STAGES}
+ do
+ if [ "${STAGE}" = "bootstrap" ] && [ -d cache/stages_bootstrap ]
then
- ${LH_ROOT_COMMAND} cp -a cache/chroot_bootstrap/* chroot
+ # Restore old cache
+ ${LH_ROOT_COMMAND} cp -a cache/stages_bootstrap/* chroot
if [ -n "${LH_ROOT_COMMAND}" ]
then
@@ -91,11 +92,14 @@ then
exit 0
fi
+ done
- if [ -d cache/bootstrap ]
+ if [ "${LH_CACHE_PACKAGES}" = "enabled" ]
+ then
+ if [ -d cache/packages_bootstrap ]
then
mkdir -p chroot/var/cache/apt/archives
- cp cache/bootstrap/*.deb chroot/var/cache/apt/archives
+ cp cache/packages_bootstrap/*.deb chroot/var/cache/apt/archives
fi
# Executing debootstrap (download-only)
@@ -107,18 +111,18 @@ then
fi
# Removing old cache
- if [ -d cache/bootstrap ]
+ if [ -d cache/packages_bootstrap ]
then
- rm -f cache/bootstrap/*.deb
+ rm -f cache/packages_bootstrap/*.deb
fi
# Saving new cache
- if [ ! -d cache/bootstrap ]
+ if [ ! -d cache/packages_bootstrap ]
then
- mkdir -p cache/bootstrap
+ mkdir -p cache/packages_bootstrap
fi
- cp chroot/var/cache/apt/archives/*.deb cache/bootstrap
+ cp chroot/var/cache/apt/archives/*.deb cache/packages_bootstrap
fi
# Executing debootstrap (regular run)
@@ -130,23 +134,26 @@ then
fi
# Removing bootstrap cache
- rm -rf chroot/var/cache/apt/archives/*.deb
+ rm -f chroot/var/cache/apt/archives/*.deb
# Saving new cache
- if [ "${LH_CACHE}" = "enabled" ]
- then
- if [ -d cache/chroot_bootstrap ]
+ for STAGE in ${LH_CACHE_STAGES}
+ do
+ if [ "${STAGE}" = "bootstrap" ]
then
- rm -rf cache/chroot_bootstrap
- fi
+ if [ -d cache/stages_bootstrap ]
+ then
+ rm -rf cache/stages_bootstrap
+ fi
- ${LH_ROOT_COMMAND} cp -a chroot cache/chroot_bootstrap
+ ${LH_ROOT_COMMAND} cp -a chroot cache/stages_bootstrap
- if [ -n "${LH_ROOT_COMMAND}" ]
- then
- ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` cache/chroot_bootstrap
+ if [ -n "${LH_ROOT_COMMAND}" ]
+ then
+ ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` cache/stages_bootstrap
+ fi
fi
- fi
+ done
# Creating stage file
Create_stagefile .stage/bootstrap
diff --git a/helpers/lh_chroot b/helpers/lh_chroot
index ab2dd8e..ed40c33 100755
--- a/helpers/lh_chroot
+++ b/helpers/lh_chroot
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "chroot: Init"
diff --git a/helpers/lh_chroot_apt b/helpers/lh_chroot_apt
index cecd8ab..c7cce89 100755
--- a/helpers/lh_chroot_apt
+++ b/helpers/lh_chroot_apt
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "chroot_apt: Init"
diff --git a/helpers/lh_chroot_debianchroot b/helpers/lh_chroot_debianchroot
index bc83028..3c65f53 100755
--- a/helpers/lh_chroot_debianchroot
+++ b/helpers/lh_chroot_debianchroot
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "chroot_debianchroot: Init"
diff --git a/helpers/lh_chroot_hacks b/helpers/lh_chroot_hacks
index ec367fb..ea74666 100755
--- a/helpers/lh_chroot_hacks
+++ b/helpers/lh_chroot_hacks
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "chroot_hacks: Init"
diff --git a/helpers/lh_chroot_hooks b/helpers/lh_chroot_hooks
index 7963193..3f874e6 100755
--- a/helpers/lh_chroot_hooks
+++ b/helpers/lh_chroot_hooks
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "chroot_hooks: Init"
diff --git a/helpers/lh_chroot_hosts b/helpers/lh_chroot_hosts
index 4262f60..3a7dec9 100755
--- a/helpers/lh_chroot_hosts
+++ b/helpers/lh_chroot_hosts
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "chroot_hosts: Init"
diff --git a/helpers/lh_chroot_interactive b/helpers/lh_chroot_interactive
index 556f079..e8c5773 100755
--- a/helpers/lh_chroot_interactive
+++ b/helpers/lh_chroot_interactive
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "chroot_interactive: Init"
diff --git a/helpers/lh_chroot_linuximage b/helpers/lh_chroot_linuximage
index e3d3786..bd0c228 100755
--- a/helpers/lh_chroot_linuximage
+++ b/helpers/lh_chroot_linuximage
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "chroot_linuximage: Init"
@@ -71,9 +72,9 @@ EOF
done
fi
- PACKAGES="${PACKAGES} casper"
+ PACKAGES="${PACKAGES} ${LH_INITRAMFS}"
- # Installing linux-image, modules and casper
+ # Installing linux-image, modules and ${LH_INITRAMFS}
case "${LH_APT}" in
apt|apt-get)
Chroot "apt-get install --yes ${PACKAGES}"
diff --git a/helpers/lh_chroot_localhooks b/helpers/lh_chroot_localhooks
index 07a5c9c..2dca7f7 100755
--- a/helpers/lh_chroot_localhooks
+++ b/helpers/lh_chroot_localhooks
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "chroot_localhooks: Init"
diff --git a/helpers/lh_chroot_localincludes b/helpers/lh_chroot_localincludes
index 777cdd1..40e9a76 100755
--- a/helpers/lh_chroot_localincludes
+++ b/helpers/lh_chroot_localincludes
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "chroot_localincludes: Init"
diff --git a/helpers/lh_chroot_localization b/helpers/lh_chroot_localization
index f81661d..914be81 100755
--- a/helpers/lh_chroot_localization
+++ b/helpers/lh_chroot_localization
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "chroot_localization: Init"
@@ -661,13 +662,13 @@ then
done
# Restoring cache
- Restore_cache cache/chroot_localization
+ Restore_cache cache/packages_localization
# Installing packages
Install_package
# Saving cache
- Save_cache cache/chroot_localization
+ Save_cache cache/packages_localization
# Creating stage file
Create_stagefile .stage/chroot_localization
diff --git a/helpers/lh_chroot_localpackages b/helpers/lh_chroot_localpackages
index 6beee2d..516e08a 100755
--- a/helpers/lh_chroot_localpackages
+++ b/helpers/lh_chroot_localpackages
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "chroot_localpackages: Init"
@@ -48,7 +49,7 @@ Create_lockfile .lock
if ls config/chroot_localpackages/*.deb &> /dev/null
then
# Restoring cache
- Restore_cache cache/chroot_localpackages
+ Restore_cache cache/packages_localpackages
# Copying packages
cp config/chroot_localpackages/*.deb chroot/root
@@ -73,7 +74,7 @@ then
rm -f chroot/root/localpackages
# Saving cache
- Save_cache cache/chroot_localpackages
+ Save_cache cache/packages_localpackages
# Creating stage file
Create_stagefile .stage/chroot_localpackages
diff --git a/helpers/lh_chroot_localpackageslists b/helpers/lh_chroot_localpackageslists
index a8459ef..4cda34e 100755
--- a/helpers/lh_chroot_localpackageslists
+++ b/helpers/lh_chroot_localpackageslists
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "chroot_localpackageslists: Init"
@@ -48,7 +49,7 @@ Create_lockfile .lock
if ls config/chroot_localpackageslists/* &> /dev/null
then
# Restoring cache
- Restore_cache cache/chroot_localpackageslists
+ Restore_cache cache/packages_localpackageslists
for PACKAGESLIST in config/chroot_localpackageslists/*
do
@@ -71,7 +72,7 @@ then
done
# Saving cache
- Save_cache cache/chroot_localpackageslists
+ Save_cache cache/packages_localpackageslists
# Creating stage file
Create_stagefile .stage/chroot_localpackageslists
diff --git a/helpers/lh_chroot_packages b/helpers/lh_chroot_packages
index 5b38fcc..5721959 100755
--- a/helpers/lh_chroot_packages
+++ b/helpers/lh_chroot_packages
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "chroot_packages: Init"
@@ -48,7 +49,7 @@ Create_lockfile .lock
if [ -n "${LIVE_PACKAGES}" ]
then
# Restoring cache
- Restore_cache cache/chroot_packages
+ Restore_cache cache/packages_packages
# Installing packages
case "${LH_APT}" in
@@ -62,7 +63,7 @@ then
esac
# Saving cache
- Save_cache cache/chroot_packages
+ Save_cache cache/packages_packages
# Creating stage file
Create_stagefile .stage/chroot_packages
diff --git a/helpers/lh_chroot_packageslists b/helpers/lh_chroot_packageslists
index 18405bd..fc915f4 100755
--- a/helpers/lh_chroot_packageslists
+++ b/helpers/lh_chroot_packageslists
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "chroot_packageslists: Init"
@@ -48,7 +49,7 @@ Create_lockfile .lock
if [ -n "${LIVE_PACKAGES_LISTS}" ]
then
# Restoring cache
- Restore_cache cache/chroot_packageslists
+ Restore_cache cache/packages_packageslists
for LIST in ${LIVE_PACKAGES_LISTS}
do
@@ -74,7 +75,7 @@ then
done
# Saving cache
- Save_cache cache/chroot_packageslists
+ Save_cache cache/packages_packageslists
# Creating stage file
Create_stagefile .stage/chroot_packageslists
diff --git a/helpers/lh_chroot_proc b/helpers/lh_chroot_proc
index 6eeec9d..563dbb4 100755
--- a/helpers/lh_chroot_proc
+++ b/helpers/lh_chroot_proc
@@ -28,10 +28,11 @@ lh_testroot
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "chroot_proc: Init"
diff --git a/helpers/lh_chroot_resolv b/helpers/lh_chroot_resolv
index 71143f2..8197b8a 100755
--- a/helpers/lh_chroot_resolv
+++ b/helpers/lh_chroot_resolv
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "chroot_resolv: Init"
diff --git a/helpers/lh_chroot_sources b/helpers/lh_chroot_sources
index 7d0980d..cb89627 100755
--- a/helpers/lh_chroot_sources
+++ b/helpers/lh_chroot_sources
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "chroot_sources: Init"
@@ -93,48 +94,110 @@ case "${1}" in
done
fi
- # Check local gpg keys
- if ls config/chroot_sources/*.build.gpg &> /dev/null
+ # Update indices from cache
+ if [ "${LH_CACHE_INDICES}" = "enabled" ] && [ -d cache/indices_build ]
then
- for FILE in config/chroot_sources/*.build.gpg
- do
- cp ${FILE} chroot/root
- Chroot "apt-key add /root/`basename ${FILE}`"
- rm -f chroot/root/`basename ${FILE}`
- done
- fi
+ if ls cache/indices_build/secring.gpg* &> /dev/null
+ then
+ cp -f cache/indices_build/secring.gpg* chroot/etc/apt
+ fi
- # Check local keyring packages
- if ls config/chroot_sources/*.deb &> /dev/null
- then
- for PACKAGE in config/chroot_sources/*.deb
- do
- cp ${PACKAGE} chroot/root
- Chroot "dpkg -i `basename ${PACKAGE}`"
- rm -f chroot/root/`basename ${PACKAGE}`
- done
- fi
+ if ls cache/indices_build/trusted.gpg* &> /dev/null
+ then
+ cp -f cache/indices_build/trusted.gpg* chroot/etc/apt
+ fi
- # Installing aptitude
- if [ "${LH_APT}" = "apt" ] || [ "${LH_APT}" = "apt-get" ]
- then
- Chroot "apt-get update"
- elif [ "${LH_APT}" = "aptitude" ]
- then
- if [ ! -x /usr/bin/aptitude ]
+ if [ -f cache/indices_build/pkgcache.bin ]
+ then
+ cp -f cache/indices_build/pkgcache.bin chroot/var/cache/apt
+ fi
+
+ if [ -f cache/indices_build/srcpkgcache.bin ]
+ then
+ cp -f cache/indices_build/srcpkgcache.bin chroot/var/cache/apt
+ fi
+
+ if ls cache/indices_build/*_Packages &> /dev/null
+ then
+ cp -f cache/indices_build/*_Packages chroot/var/lib/apt/lists
+ fi
+
+ if ls cache/indices_build/*_Sources &> /dev/null
+ then
+ cp -f cache/indices_build/*_Sources chroot/var/lib/apt/lists
+ fi
+
+ if ls cache/indices_build/*_Release* &> /dev/null
+ then
+ cp -f cache/indices_build/*_Release* chroot/var/lib/apt/lists
+ fi
+
+ if [ "${LH_APT}" = "aptitude" ] && [ ! -x /usr/bin/aptitude ]
then
- Chroot "apt-get update"
Chroot "apt-get install --yes --force-yes aptitude"
fi
+ else # Get fresh indices
+ # Check local gpg keys
+ if ls config/chroot_sources/*.build.gpg &> /dev/null
+ then
+ for FILE in config/chroot_sources/*.build.gpg
+ do
+ cp ${FILE} chroot/root
+ Chroot "apt-key add /root/`basename ${FILE}`"
+ rm -f chroot/root/`basename ${FILE}`
+ done
+ fi
- Chroot "aptitude update"
- fi
+ # Check local keyring packages
+ if ls config/chroot_sources/*.deb &> /dev/null
+ then
+ for PACKAGE in config/chroot_sources/*.deb
+ do
+ cp ${PACKAGE} chroot/root
+ Chroot "dpkg -i `basename ${PACKAGE}`"
+ rm -f chroot/root/`basename ${PACKAGE}`
+ done
+ fi
- # Installing keyring packages
- if [ -n "${LIVE_KEYRING_PACKAGES}" ]
- then
- Chroot "apt-get install --yes --force-yes ${LIVE_KEYRING_PACKAGES}"
- Chroot "apt-get update"
+ # Installing aptitude
+ if [ "${LH_APT}" = "apt" ] || [ "${LH_APT}" = "apt-get" ]
+ then
+ Chroot "apt-get update"
+ elif [ "${LH_APT}" = "aptitude" ]
+ then
+ if [ ! -x /usr/bin/aptitude ]
+ then
+ Chroot "apt-get update"
+ Chroot "apt-get install --yes --force-yes aptitude"
+ fi
+
+ Chroot "aptitude update"
+ fi
+
+ # Installing keyring packages
+ if [ -n "${LIVE_KEYRING_PACKAGES}" ]
+ then
+ Chroot "apt-get install --yes --force-yes ${LIVE_KEYRING_PACKAGES}"
+ Chroot "apt-get update"
+ fi
+
+ if [ "${LH_CACHE_INDICES}" = "enabled" ]
+ then
+ if [ ! -d cache/indices_build ]
+ then
+ mkdir -p cache/indices_build
+ fi
+
+ cp -f chroot/etc/apt/secring.gpg* cache/indices_build
+ cp -f chroot/etc/apt/trusted.gpg* cache/indices_build
+
+ cp -f chroot/var/cache/apt/pkgcache.bin cache/indices_build
+ cp -f chroot/var/cache/apt/srcpkgcache.bin cache/indices_build
+
+ cp -f chroot/var/lib/apt/lists/*_Packages cache/indices_build
+ cp -f chroot/var/lib/apt/lists/*_Sources cache/indices_build
+ cp -f chroot/var/lib/apt/*_Release* cache/indices_build
+ fi
fi
# Creating stage file
diff --git a/helpers/lh_chroot_symlinks b/helpers/lh_chroot_symlinks
index 2aef0df..2f89d41 100755
--- a/helpers/lh_chroot_symlinks
+++ b/helpers/lh_chroot_symlinks
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "chroot_symlinks: Init"
diff --git a/helpers/lh_chroot_sysfs b/helpers/lh_chroot_sysfs
index 5cf50c3..244369c 100755
--- a/helpers/lh_chroot_sysfs
+++ b/helpers/lh_chroot_sysfs
@@ -28,10 +28,11 @@ lh_testroot
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "chroot_sysfs: Init"
diff --git a/helpers/lh_chroot_sysvinit b/helpers/lh_chroot_sysvinit
index 4cee00b..16f40f1 100755
--- a/helpers/lh_chroot_sysvinit
+++ b/helpers/lh_chroot_sysvinit
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "chroot_sysvinit: Init"
@@ -54,7 +55,7 @@ then
done
# Re-enable all required (taken from -f standard chroot)
- for PACKAGE in casper console-common cron dpkg ifupdown initscripts kbd klogd libc6 libdevmapper1.02 libselinux1 libsepol1 login makedev module-init-tools netbase openbsd-inetd procps sudo sysklogd udev util-linux
+ for PACKAGE in ${LH_INITRAMFS} console-common cron dpkg ifupdown initscripts kbd klogd libc6 libdevmapper1.02 libselinux1 libsepol1 login makedev module-init-tools netbase openbsd-inetd procps sudo sysklogd udev util-linux
do
if [ -f chroot/var/lib/dpkg/info/${PACKAGE}.postinst ]
then
diff --git a/helpers/lh_chroot_sysvrc b/helpers/lh_chroot_sysvrc
index 8913236..1729f46 100755
--- a/helpers/lh_chroot_sysvrc
+++ b/helpers/lh_chroot_sysvrc
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "chroot_sysvrc: Init"
diff --git a/helpers/lh_chroot_tasks b/helpers/lh_chroot_tasks
index 64cd47f..0e096d4 100755
--- a/helpers/lh_chroot_tasks
+++ b/helpers/lh_chroot_tasks
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "chroot_tasks: Init"
@@ -48,7 +49,7 @@ Create_lockfile .lock
if [ -n "${LIVE_TASKS}" ]
then
# Restoring cache
- Restore_cache cache/chroot_tasks
+ Restore_cache cache/packages_tasks
# Checking depends
case "${LH_TASKSEL}" in
@@ -82,7 +83,7 @@ then
Remove_package
# Saving cache
- Save_cache cache/chroot_tasks
+ Save_cache cache/packages_tasks
# Creating stage file
Create_stagefile .stage/chroot_tasks
diff --git a/helpers/lh_clean b/helpers/lh_clean
index 24a65e3..f016e95 100755
--- a/helpers/lh_clean
+++ b/helpers/lh_clean
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
case "${1}" in
@@ -60,9 +61,9 @@ case "${1}" in
${LH_ROOT_COMMAND} rm -rf chroot chroot.tmp
- if [ "${PURGE}" != "true" ] && [ -d cache/chroot_bootstrap ]
+ if [ "${PURGE}" != "true" ] && [ -d cache/stages_bootstrap ]
then
- ${LH_ROOT_COMMAND} cp -a cache/chroot_bootstrap chroot
+ ${LH_ROOT_COMMAND} cp -a cache/stages_bootstrap chroot
mkdir -p .stage
touch .stage/bootstrap
fi
diff --git a/helpers/lh_config b/helpers/lh_config
index 4f3e844..3b4f940 100755
--- a/helpers/lh_config
+++ b/helpers/lh_config
@@ -46,7 +46,8 @@ then
Read_conffile "${LIVE_ROOT}"/config/common
Read_conffile "${LIVE_ROOT}"/config/bootstrap
Read_conffile "${LIVE_ROOT}"/config/chroot
- Read_conffile "${LIVE_ROOT}"/config/image
+ Read_conffile "${LIVE_ROOT}"/config/binary
+ Read_conffile "${LIVE_ROOT}"/config/source
fi
# Setting defaults
@@ -97,9 +98,17 @@ LH_APT_SECURE="${LH_APT_SECURE}"
# (Default: ${LH_BOOTSTRAP})
LH_BOOTSTRAP="${LH_BOOTSTRAP}"
-# \$LH_CACHE: control if downloaded packages should be cached
-# (Default: ${LH_CACHE})
-LH_CACHE="${LH_CACHE}"
+# \$LH_CACHE_INDICES: control if downloaded packages should be cached
+# (Default: ${LH_CACHE_INDICES})
+LH_CACHE_INDICES="${LH_CACHE_INDICES}"
+
+# \$LH_CACHE_PACKAGES: control if downloaded packages should be cached
+# (Default: ${LH_CACHE_PACKAGES})
+LH_CACHE_PACKAGES="${LH_CACHE_PACKAGES}"
+
+# \$LH_CACHE_STAGES: control if downloaded packages should be cached
+# (Default: ${LH_CACHE_STAGES})
+LH_CACHE_STAGES="${LH_CACHE_STAGES}"
# \$LH_DEBCONF_FRONTEND: set the debconf(1) frontend to use
# (Default: ${LH_DEBCONF_FRONTEND})
@@ -125,10 +134,22 @@ LH_LOSETUP="${LH_LOSETUP}"
# (Default: ${LH_TASKSEL})
LH_TASKSEL="${LH_TASKSEL}"
+# \$LH_INITRAMFS: set the initramfs generator
+# (Default: ${LH_INITRAMFS})
+LH_INITRAMFS="${LH_INITRAMFS}"
+
# \$LIVE_ROOT: set the root directory
# (Default: ${LIVE_ROOT})
LIVE_ROOT="${LIVE_ROOT}"
+# \$LIVE_INCLUDES: set includes
+# (Default: ${LIVE_INCLUDES})
+LIVE_INCLUDES="${LIVE_INCLUDES}"
+
+# \$LIVE_TEMPLATES: set templates
+# (Default: ${LIVE_TEMPLATES})
+LIVE_TEMPLATES="${LIVE_TEMPLATES}"
+
# Live-helper options
# \$LH_ROOT_COMMAND: use sudo or equivalent
@@ -257,9 +278,9 @@ LIVE_MIRROR_IMAGE_SECURITY="${LIVE_MIRROR_IMAGE_SECURITY}"
LIVE_SECTIONS="${LIVE_SECTIONS}"
EOF
-# Creating lh_image_* configuration
-cat > "${LIVE_ROOT}"/config/image << EOF
-# config/chroot: configuration for lh_image_*
+# Creating lh_binary_* configuration
+cat > "${LIVE_ROOT}"/config/binary << EOF
+# config/chroot: configuration for lh_binary_*
# \$LIVE_BOOTAPPEND: set boot parameters
# (Default: empty)
@@ -285,6 +306,10 @@ LIVE_FILESYSTEM="${LIVE_FILESYSTEM}"
# (Default: ${LIVE_MEMTEST})
LIVE_MEMTEST="${LIVE_MEMTEST}"
+# \$LIVE_DEBIAN_INSTALLER: set debian-installer
+# (Default: ${LIVE_DEBIAN_INSTALLER})
+LIVE_DEBIAN_INSTALLER="${LIVE_DEBIAN_INSTALLER}"
+
# \$LIVE_ISO_VOLUME: set iso volume
# (Default: ${LIVE_ISO_VOLUME})
LIVE_ISO_VOLUME="${LIVE_ISO_VOLUME}"
@@ -297,10 +322,6 @@ LIVE_SERVER_ADDRESS="${LIVE_SERVER_ADDRESS}"
# (Default: ${LIVE_SERVER_PATH})
LIVE_SERVER_PATH="${LIVE_SERVER_PATH}"
-# \$LIVE_SOURCE: set source option
-# (Default: ${LH_SOURCE})
-LIVE_SOURCE="${LIVE_SOURCE}"
-
# \$LIVE_BOOTLOADER: set bootloader
# (Default: ${LIVE_BOOTLOADER})
LIVE_BOOTLOADER="${LIVE_BOOTLOADER}"
@@ -316,18 +337,19 @@ LIVE_SYSLINUX_SPLASH="${LIVE_SYSLINUX_SPLASH}"
# \$LIVE_BINARY_IMAGE: set image type
# (Default: ${LIVE_BINARY_IMAGE})
LIVE_BINARY_IMAGE="${LIVE_BINARY_IMAGE}"
+EOF
+
+# Creating lh_source_* configuration
+cat > "${LIVE_ROOT}"/config/source << EOF
+# config/chroot: configuration for lh_source_*
+
+# \$LIVE_SOURCE: set source option
+# (Default: ${LH_SOURCE})
+LIVE_SOURCE="${LIVE_SOURCE}"
# \$LIVE_SOURCE_IMAGE: set image type
# (Default: ${LIVE_SOURCE_IMAGE})
LIVE_SOURCE_IMAGE="${LIVE_SOURCE_IMAGE}"
-
-# \$LIVE_INCLUDES: set includes
-# (Default: ${LIVE_INCLUDES})
-LIVE_INCLUDES="${LIVE_INCLUDES}"
-
-# \$LIVE_TEMPLATES: set templates
-# (Default: ${LIVE_TEMPLATES})
-LIVE_TEMPLATES="${LIVE_TEMPLATES}"
EOF
# Creating lh_binary_* directories
diff --git a/helpers/lh_losetup b/helpers/lh_losetup
index 47c8f34..a8d6176 100755
--- a/helpers/lh_losetup
+++ b/helpers/lh_losetup
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "losetup: Init"
diff --git a/helpers/lh_source b/helpers/lh_source
index b8892d2..a595569 100755
--- a/helpers/lh_source
+++ b/helpers/lh_source
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "source: Init"
@@ -48,7 +49,7 @@ lh_source_generic "${@}"
lh_source_hdd "${@}"
lh_source_iso "${@}"
lh_source_net "${@}"
-lh_source_usb "${@}"
+lh_source_usb-hdd "${@}"
# Deconfiguring chroot
rm -f .stage/chroot_sources
diff --git a/helpers/lh_source_config b/helpers/lh_source_config
index 5b549be..2c3db26 100755
--- a/helpers/lh_source_config
+++ b/helpers/lh_source_config
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "source_config: Init"
diff --git a/helpers/lh_source_download b/helpers/lh_source_download
index d9f0adf..050dc4d 100755
--- a/helpers/lh_source_download
+++ b/helpers/lh_source_download
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "source_download: Init"
@@ -59,7 +60,7 @@ fi
# Download sources
Chroot "dpkg --get-selections" | awk '{ print $1 }' > chroot/root/dpkg-selection.txt
echo "${LIVE_BOOTLOADER}" >> chroot/root/dpkg-selection.txt
-#echo "live-helper" >> chroot/root/dpkg-selection.txt
+echo "live-helper" >> chroot/root/dpkg-selection.txt
Chroot "xargs --arg-file=/root/dpkg-selection.txt apt-get source --download-only"
rm -f chroot/root/dpkg-selection.txt
diff --git a/helpers/lh_source_generic b/helpers/lh_source_generic
index d3e8009..6bd2a77 100755
--- a/helpers/lh_source_generic
+++ b/helpers/lh_source_generic
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "source_generic: Init"
diff --git a/helpers/lh_source_hdd b/helpers/lh_source_hdd
index 498a18b..ac5ff73 100755
--- a/helpers/lh_source_hdd
+++ b/helpers/lh_source_hdd
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "source_hdd: Init"
diff --git a/helpers/lh_source_iso b/helpers/lh_source_iso
index f69b705..b001727 100755
--- a/helpers/lh_source_iso
+++ b/helpers/lh_source_iso
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "source_iso: Init"
diff --git a/helpers/lh_source_md5sum b/helpers/lh_source_md5sum
index e175663..9569c22 100755
--- a/helpers/lh_source_md5sum
+++ b/helpers/lh_source_md5sum
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "source_md5sum: Init"
diff --git a/helpers/lh_source_net b/helpers/lh_source_net
index 67ed8fa..4b63bef 100755
--- a/helpers/lh_source_net
+++ b/helpers/lh_source_net
@@ -25,10 +25,11 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Breakpoint "source_net: Init"
diff --git a/helpers/lh_source_usb b/helpers/lh_source_usb-hdd
index 91207de..7cc7c23 100755
--- a/helpers/lh_source_usb
+++ b/helpers/lh_source_usb-hdd
@@ -1,6 +1,6 @@
#!/bin/sh
-# lh_source_usb(1) - build source image
+# lh_source_usb-hdd(1) - build source image
# Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org>
#
# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@@ -25,13 +25,14 @@ Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
# Reading configuration files
+Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/common
-Read_conffile config/image
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
-Breakpoint "source_usb: Init"
+Breakpoint "source_usb-hdd: Init"
if [ "${LIVE_SOURCE}" != "enabled" ]
then
@@ -40,13 +41,13 @@ fi
for IMAGE in ${LIVE_SOURCE_IMAGE}
do
- if [ "${IMAGE}" = "usb" ]
+ if [ "${IMAGE}" = "usb-hdd" ]
then
# Requiring stage file
Require_stagefile .stage/source_download
# Checking stage file
- Check_stagefile .stage/source_usb
+ Check_stagefile .stage/source_usb-hdd
# Checking lock file
Check_lockfile .lock
@@ -88,7 +89,7 @@ do
${LH_LOSETUP} -d ${FREELO}
lh_losetup $FREELO source.img 1
- Chroot "mkfs.msdos -n DEBIAN_LIVE ${FREELO}"
+ Chroot " mkfs.vfat -F 16 -n DEBIAN_LIVE ${FREELO}"
mkdir -p source.tmp
${LH_ROOT_COMMAND} mount ${FREELO} source.tmp
cp -r source/* source.tmp
@@ -107,6 +108,6 @@ do
Remove_package
# Creating stage file
- Create_stagefile .stage/source_usb
+ Create_stagefile .stage/source_usb-hdd
fi
done
diff --git a/helpers/lh_testroot b/helpers/lh_testroot
index bb5592e..679119e 100755
--- a/helpers/lh_testroot
+++ b/helpers/lh_testroot
@@ -24,6 +24,10 @@ Arguments "${@}"
# Reading configuration files
Read_conffile config/common
+Read_conffile config/bootstrap
+Read_conffile config/chroot
+Read_conffile config/binary
+Read_conffile config/source
Set_defaults
Echo_debug "Init ${PROGRAM}"
diff --git a/helpers/make-live b/helpers/make-live
index 35ae73c..36546dd 100755
--- a/helpers/make-live
+++ b/helpers/make-live
@@ -31,7 +31,7 @@ done
# Set static variables
PROGRAM="`basename ${0}`"
DESCRIPTION="utility to build Debian Live systems"
-USAGE="${PROGRAM} [config] [--mode MODE] [--config CONFIG] [--apt apt|aptitude] [--apt-ftpproxy URL] [--apt-httpproxy URL] [--apt-generic enabled|disabled] [--apt-pdiffs enabled|disabled] [--apt-recommends enabled|disabled] [--apt-secure enabled|disabled] [--bootstrap cdebootstrap|deboostrap] [--cache enabled|disabled] [--debconf-frontend dialog|readline|noninteractive] [--debconf-priority low|medium|high|critical] [--debconf-nowarnings yes|no] [--genisoimage genisoimage|mkisofs] [--losetup losetup|losetup.org] [--tasksel aptitude|tasksel] [-r|--root DIRECTORY] [-a|--architecture ARCHITECTURE] [-d|--distribution stable|testing|unstable|etch|lenny|sid] [--distribution-config DIRECTORY] [-f|--bootstrap-flavour minimal|standard] [-m|--mirror-build URL] [--mirror-build-security URL] [--mirror-image URL] [--mirror-image-security URL] [--sections SECTION|\"SECTIONS\"] [--interactive shell|x11|xnest] [-k|--kernel-flavour FLAVOUR] [--kernel-packages PACKAGE|\"PACKAGES\"] [--keyring-packages PACKAGE|\"PACKAGES\"] [--hooks \"COMMAND\"|\"COMMANDS\"] [-l|--language LANGUAGE] [--packages PACKAGE|\"PACKAGES\"] [-p|--packages-lists LIST|\"LISTS\"] [--tasks TASK|\"TASKS\"] [--security enabled|disabled] [--symlinks enabled|disabled] [--sysvinit enabled|disabled] [--bootappend KERNEL_PARAMETER|\"KERNEL_PARAMETERS\"] [-e|--encryption ALGORITHM] [--username NAME] [--hostname NAME] [--filesystem ext2|plain|squashfs] [--memtest memtest86|memtest86+] [--iso-volume STRING] [--server-address HOSTNAME|IP] [--server-path DIRECTORY] [--source enabled|disabled] [--bootloader grub|syslinux] [--grub-splash FILE] [--syslinux-splash FILE] [-b|--binary-image hdd|iso|usb|net] [-s|--source-image generic|hdd|iso|usb|net] [--includes PATH] [--templates PATH] [--breakpoints] [--debug] [--force] [--quiet] [--verbose] [--root-command sudo]"
+USAGE="${PROGRAM} [config] [--mode MODE] [--config CONFIG] [--apt apt|aptitude] [--apt-ftpproxy URL] [--apt-httpproxy URL] [--apt-generic enabled|disabled] [--apt-pdiffs enabled|disabled] [--apt-recommends enabled|disabled] [--apt-secure enabled|disabled] [--bootstrap cdebootstrap|deboostrap] [--cache enabled|disabled] [--debconf-frontend dialog|readline|noninteractive] [--debconf-priority low|medium|high|critical] [--debconf-nowarnings yes|no] [--genisoimage genisoimage|mkisofs] [--losetup losetup|losetup.org] [--tasksel aptitude|tasksel] [-r|--root DIRECTORY] [-a|--architecture ARCHITECTURE] [-d|--distribution stable|testing|unstable|etch|lenny|sid] [--distribution-config DIRECTORY] [-f|--bootstrap-flavour minimal|standard] [-m|--mirror-build URL] [--mirror-build-security URL] [--mirror-image URL] [--mirror-image-security URL] [--sections SECTION|\"SECTIONS\"] [--interactive shell|x11|xnest] [-k|--kernel-flavour FLAVOUR] [--kernel-packages PACKAGE|\"PACKAGES\"] [--keyring-packages PACKAGE|\"PACKAGES\"] [--hooks \"COMMAND\"|\"COMMANDS\"] [-l|--language LANGUAGE] [--packages PACKAGE|\"PACKAGES\"] [-p|--packages-lists LIST|\"LISTS\"] [--tasks TASK|\"TASKS\"] [--security enabled|disabled] [--symlinks enabled|disabled] [--sysvinit enabled|disabled] [--bootappend KERNEL_PARAMETER|\"KERNEL_PARAMETERS\"] [-e|--encryption ALGORITHM] [--username NAME] [--hostname NAME] [--filesystem ext2|plain|squashfs] [--memtest memtest86|memtest86+] [--iso-volume STRING] [--server-address HOSTNAME|IP] [--server-path DIRECTORY] [--source enabled|disabled] [--bootloader grub|syslinux] [--grub-splash FILE] [--syslinux-splash FILE] [-b|--binary-image hdd|iso|usb-hdd|net] [-s|--source-image generic|hdd|iso|usb-hdd|net] [--includes PATH] [--templates PATH] [--breakpoints] [--debug] [--force] [--quiet] [--verbose] [--root-command sudo]"
HELP="Lists: gnome, gnome-core, gnome-desktop, gnome-full, gnome-junior, gnustep, kde, kde-core, kde-desktop, kde-extra, kde-full, kde-junior, mini, minimal, minimal-net, rescue, standard, standard-x11, xfce, xfce-desktop, xfce-junior"