summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/lh_binary1
-rwxr-xr-xhelpers/lh_binary_chroot7
-rwxr-xr-xhelpers/lh_binary_encryption128
-rwxr-xr-xhelpers/lh_binary_grub277
-rwxr-xr-xhelpers/lh_binary_hdd8
-rwxr-xr-xhelpers/lh_binary_includes12
-rwxr-xr-xhelpers/lh_binary_iso7
-rwxr-xr-xhelpers/lh_binary_linuximage6
-rwxr-xr-xhelpers/lh_binary_localincludes8
-rwxr-xr-xhelpers/lh_binary_manifest6
-rwxr-xr-xhelpers/lh_binary_md5sum6
-rwxr-xr-xhelpers/lh_binary_memtest866
-rwxr-xr-xhelpers/lh_binary_net17
-rwxr-xr-xhelpers/lh_binary_rootfs6
-rwxr-xr-xhelpers/lh_binary_syslinux6
-rwxr-xr-xhelpers/lh_binary_usb7
-rwxr-xr-xhelpers/lh_bootstrap7
-rwxr-xr-xhelpers/lh_bootstrap_cdebootstrap17
-rwxr-xr-xhelpers/lh_bootstrap_debootstrap9
-rwxr-xr-xhelpers/lh_build3
-rwxr-xr-xhelpers/lh_chroot8
-rwxr-xr-xhelpers/lh_chroot_apt8
-rwxr-xr-xhelpers/lh_chroot_debianchroot8
-rwxr-xr-xhelpers/lh_chroot_hacks8
-rwxr-xr-xhelpers/lh_chroot_hooks8
-rwxr-xr-xhelpers/lh_chroot_hosts8
-rwxr-xr-xhelpers/lh_chroot_interactive8
-rwxr-xr-xhelpers/lh_chroot_linuximage8
-rwxr-xr-xhelpers/lh_chroot_localhooks8
-rwxr-xr-xhelpers/lh_chroot_localincludes8
-rwxr-xr-xhelpers/lh_chroot_localization8
-rwxr-xr-xhelpers/lh_chroot_localpackages8
-rwxr-xr-xhelpers/lh_chroot_localpackageslists8
-rwxr-xr-xhelpers/lh_chroot_packages7
-rwxr-xr-xhelpers/lh_chroot_packageslists8
-rwxr-xr-xhelpers/lh_chroot_proc11
-rwxr-xr-xhelpers/lh_chroot_resolv8
-rwxr-xr-xhelpers/lh_chroot_sources71
-rwxr-xr-xhelpers/lh_chroot_symlinks8
-rwxr-xr-xhelpers/lh_chroot_sysfs11
-rwxr-xr-xhelpers/lh_chroot_sysvinit8
-rwxr-xr-xhelpers/lh_chroot_sysvrc8
-rwxr-xr-xhelpers/lh_chroot_tasks8
-rwxr-xr-xhelpers/lh_clean5
-rwxr-xr-xhelpers/lh_config35
-rwxr-xr-xhelpers/lh_losetup7
-rwxr-xr-xhelpers/lh_source6
-rwxr-xr-xhelpers/lh_source_config6
-rwxr-xr-xhelpers/lh_source_download6
-rwxr-xr-xhelpers/lh_source_generic6
-rwxr-xr-xhelpers/lh_source_hdd6
-rwxr-xr-xhelpers/lh_source_iso6
-rwxr-xr-xhelpers/lh_source_md5sum6
-rwxr-xr-xhelpers/lh_source_net6
-rwxr-xr-xhelpers/lh_source_usb7
-rwxr-xr-xhelpers/lh_testroot2
-rwxr-xr-xhelpers/make-live39
57 files changed, 686 insertions, 253 deletions
diff --git a/helpers/lh_binary b/helpers/lh_binary
index d972625..1326637 100755
--- a/helpers/lh_binary
+++ b/helpers/lh_binary
@@ -23,6 +23,7 @@ USAGE="${PROGRAM} [--force]"
Arguments "${@}"
Echo_debug "Init ${PROGRAM}"
+Breakpoint "binary: Init"
# Preparing root filesystem
lh_binary_chroot "${@}"
diff --git a/helpers/lh_binary_chroot b/helpers/lh_binary_chroot
index 5cde421..86da15d 100755
--- a/helpers/lh_binary_chroot
+++ b/helpers/lh_binary_chroot
@@ -22,10 +22,17 @@ USAGE="${PROGRAM} [--force]"
Arguments "${@}"
+Echo_debug "Init ${PROGRAM}"
+
# Reading configuration files
+Read_conffile config/bootstrap
+Read_conffile config/chroot
Read_conffile config/common
+Read_conffile config/image
Set_defaults
+Breakpoint "binary_chroot: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_binary_encryption b/helpers/lh_binary_encryption
index 03c056f..09c0fea 100755
--- a/helpers/lh_binary_encryption
+++ b/helpers/lh_binary_encryption
@@ -22,64 +22,73 @@ USAGE="${PROGRAM} [--force]"
Arguments "${@}"
+Echo_debug "Init ${PROGRAM}"
+
# Reading configuration files
+Read_conffile config/bootstrap
+Read_conffile config/chroot
Read_conffile config/common
Read_conffile config/image
Set_defaults
-if [ -n "${LIVE_ENCRYPTION}" ]
+if [ -z "${LIVE_ENCRYPTION}" ]
then
- # Requiring stage file
- Require_stagefile .stage/bootstrap
- Require_stagefile .stage/binary_rootfs
+ exit 0
+fi
- # Checking lock file
- Check_lockfile .lock
+Breakpoint "binary_encryption: Init"
- # Creating lock file
- Create_lockfile .lock
+# Requiring stage file
+Require_stagefile .stage/bootstrap
+Require_stagefile .stage/binary_rootfs
- # Checking stage file
- Check_stagefile .stage/binary_encryption
+# Checking lock file
+Check_lockfile .lock
- case "${LIVE_FILESYSTEM}" in
- ext2)
- ROOTFS="ext2"
- ;;
+# Creating lock file
+Create_lockfile .lock
- plain)
- echo "W: encryption not supported on plain filesystem."
- exit 0
- ;;
+# Checking stage file
+Check_stagefile .stage/binary_encryption
- squashfs)
- ROOTFS="squashfs"
- ;;
- esac
+case "${LIVE_FILESYSTEM}" in
+ ext2)
+ ROOTFS="ext2"
+ ;;
- if [ ! -f chroot/usr/bin/aespipe ]
- then
- PACKAGES="${PACKAGES} aespipe"
- fi
+ plain)
+ echo "W: encryption not supported on plain filesystem."
+ exit 0
+ ;;
- if [ -n "${PACKAGES}" ]
- then
- # Installing packages
- case "${LH_APT}" in
- apt|apt-get)
- Chroot "apt-get install --yes ${PACKAGES}"
- ;;
+ squashfs)
+ ROOTFS="squashfs"
+ ;;
+esac
- aptitude)
- Chroot "aptitude install --assume-yes ${PACKAGES}"
- ;;
- esac
- fi
+if [ ! -f chroot/usr/bin/aespipe ]
+then
+ PACKAGES="${PACKAGES} aespipe"
+fi
- # Moving image
- mv binary/casper/filesystem.${LIVE_FILESYSTEM} chroot
+if [ -n "${PACKAGES}" ]
+then
+ # Installing packages
+ case "${LH_APT}" in
+ apt|apt-get)
+ Chroot "apt-get install --yes ${PACKAGES}"
+ ;;
- echo "Encrypting binary/casper/filesystem.${ROOTFS} with ${LIVE_ENCRYPTION}..."
+ aptitude)
+ Chroot "aptitude install --assume-yes ${PACKAGES}"
+ ;;
+ esac
+fi
+
+# Moving image
+mv binary/casper/filesystem.${LIVE_FILESYSTEM} chroot
+
+echo "Encrypting binary/casper/filesystem.${ROOTFS} with ${LIVE_ENCRYPTION}..."
cat >> chroot/encrypt << EOF
while true
@@ -98,25 +107,24 @@ do
done
EOF
- Chroot "sh encrypt"
-
- # Move image
- mv chroot/filesystem.${LIVE_FILESYSTEM} binary/casper
- rm -f chroot/encrypt
+Chroot "sh encrypt"
- # Removing packages
- if [ -n "${PACKAGES}" ]
- then
- case "${LH_APT}" in
- apt|apt-get)
- Chroot "apt-get remove --purge --yes ${PACKAGES}"
- ;;
- aptitude)
- Chroot "aptitude purge --assume-yes ${PACKAGES}"
- ;;
- esac
- fi
+# Move image
+mv chroot/filesystem.${LIVE_FILESYSTEM} binary/casper
+rm -f chroot/encrypt
- # Creating stage file
- Create_stagefile .stage/binary_encryption
+# Removing packages
+if [ -n "${PACKAGES}" ]
+then
+ case "${LH_APT}" in
+ apt|apt-get)
+ Chroot "apt-get remove --purge --yes ${PACKAGES}"
+ ;;
+ aptitude)
+ Chroot "aptitude purge --assume-yes ${PACKAGES}"
+ ;;
+ esac
fi
+
+# Creating stage file
+Create_stagefile .stage/binary_encryption
diff --git a/helpers/lh_binary_grub b/helpers/lh_binary_grub
index 2de092d..c115f79 100755
--- a/helpers/lh_binary_grub
+++ b/helpers/lh_binary_grub
@@ -22,13 +22,22 @@ 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/common
Read_conffile config/image
Set_defaults
+if [ "${LIVE_BOOTLOADER}" != "grub" ]
+then
+ exit 0
+fi
+
+Breakpoint "binary_grub: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
@@ -43,153 +52,156 @@ Check_stagefile .stage/binary_grub
if [ "${LIVE_ARCHITECTURE}" != "amd64" ] && [ "${LIVE_ARCHITECTURE}" != "i386" ]
then
- echo "W: skipping binary_grub, foreign architecture."
+ Echo_warning "skipping binary_grub, foreign architecture."
exit 0
fi
-if [ "${LIVE_BOOTLOADER}" = "grub" ]
+# Check templates
+if [ ! -d "${LIVE_TEMPLATES}" ]
then
- # Check templates
- if [ ! -d "${LIVE_TEMPLATES}" ]
+ if [ -d ../"${LIVE_TEMPLATES}" ]
then
- if [ -d ../"${LIVE_TEMPLATES}" ]
- then
- LIVE_TEMPLATES="../${LIVE_TEMPLATES}"
- else
- Echo_error "user specified templates not accessible in ${LIVE_TEMPLATES}"
- exit 1
- fi
- fi
-
- if [ ! -f chroot/usr/sbin/grub ]
- then
- PACKAGES="${PACKAGES} grub"
+ LIVE_TEMPLATES="../${LIVE_TEMPLATES}"
+ else
+ Echo_error "user specified templates not accessible in ${LIVE_TEMPLATES}"
+ exit 1
fi
+fi
- if [ -n "${PACKAGES}" ]
- then
- # Installing symlinks
- case "${LH_APT}" in
- apt|apt-get)
- Chroot "apt-get install --yes ${PACKAGES}"
- ;;
-
- aptitude)
- Chroot "aptitude install --assume-yes ${PACKAGES}"
- ;;
- esac
- fi
+if [ ! -f chroot/usr/sbin/grub ]
+then
+ PACKAGES="${PACKAGES} grub"
+fi
- # Setting destination directory
- case "${LIVE_BINARY_IMAGE}" in
- iso|usb|hdd)
- DESTDIR="binary/live"
+if [ -n "${PACKAGES}" ]
+then
+ # Installing symlinks
+ case "${LH_APT}" in
+ apt|apt-get)
+ Chroot "apt-get install --yes ${PACKAGES}"
+ ;;
+
+ aptitude)
+ Chroot "aptitude install --assume-yes ${PACKAGES}"
;;
+ esac
+fi
+
+# Setting destination directory
+case "${LIVE_BINARY_IMAGE}" in
+ iso|usb|hdd)
+ DESTDIR="binary/live"
+ ;;
+
+ net)
+ Echo_error "not supported, FIXME"
+ ;;
+esac
- net)
- Echo_error "not supported, FIXME"
+# Temporary check for broken syslinux
+if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
+then
+ case "${LIVE_ARCHITECTURE}" in
+ i386)
+ DESTDIR="${DESTDIR}.386"
;;
esac
+fi
- # Temporary check for broken syslinux
- if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
- then
- case "${LIVE_ARCHITECTURE}" in
- i386)
- DESTDIR="${DESTDIR}.386"
- ;;
- esac
- fi
-
- # Creating directory
- if [ ! -d "${DESTDIR}" ]
- then
- mkdir -p "${DESTDIR}"
- fi
+# Creating directory
+if [ ! -d "${DESTDIR}" ]
+then
+ mkdir -p "${DESTDIR}"
+fi
- # Setting boot parameters
- if [ -n "${LIVE_ENCRYPTION}" ]
- then
- LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND} encryption=${LIVE_ENCRYPTION}"
- fi
+# Setting boot parameters
+if [ -n "${LIVE_ENCRYPTION}" ]
+then
+ LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND} encryption=${LIVE_ENCRYPTION}"
+fi
- if [ -n "${LIVE_USERNAME}" ]
- then
- LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND} username=${LIVE_USERNAME}"
- fi
+if [ -n "${LIVE_USERNAME}" ]
+then
+ LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND} username=${LIVE_USERNAME}"
+fi
- if [ -n "${LIVE_HOSTNAME}" ]
- then
- LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND} hostname=${LIVE_HOSTNAME}"
- fi
+if [ -n "${LIVE_HOSTNAME}" ]
+then
+ LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND} hostname=${LIVE_HOSTNAME}"
+fi
- LIVE_BOOTAPPEND="`echo ${LIVE_BOOTAPPEND} | sed -e 's/ //'`"
+LIVE_BOOTAPPEND="`echo ${LIVE_BOOTAPPEND} | sed -e 's/ //'`"
- # Assembling kernel configuration
- if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
- then
- DEFAULT_FLAVOUR="`echo ${LIVE_KERNEL_FLAVOUR} | awk '{ print $1 }'`"
- LINUX="title\t\tDebian GNU/Linux - Live\nroot\t\t(cd)\nkernel\t\t/`basename ${DESTDIR}`/`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
- else
- DEFAULT_FLAVOUR="`echo ${LIVE_KERNEL_FLAVOUR} | awk '{ print $1 }'`"
- LINUX="title\t\tDebian GNU/Linux - Live\nroot\t\t(cd)\nkernel\t\t`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\ninitrd\t\tinitrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
- fi
+# Assembling kernel configuration
+if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
+then
+ 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}`\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
+else
+ DEFAULT_FLAVOUR="`echo ${LIVE_KERNEL_FLAVOUR} | awk '{ print $1 }'`"
+ LINUX="title\t\tDebian GNU/Linux - Live\nkernel\t\t`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\ninitrd\t\tinitrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
+fi
- if [ "`echo ${LIVE_KERNEL_FLAVOUR} | wc -w`" -gt "1" ]
- then
- for KERNEL in chroot/boot/vmlinuz*
- do
- if [ -z "${LINUX}" ]
+if [ "`echo ${LIVE_KERNEL_FLAVOUR} | wc -w`" -gt "1" ]
+then
+ for KERNEL in chroot/boot/vmlinuz*
+ do
+ if [ -z "${LINUX}" ]
+ then
+ if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
+ then
+ LINUX="title\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nkernel\t\t/`basename ${DESTDIR}`/`basename ${KERNEL}`\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
+ else
+ LINUX="title\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nkernel\t\t`basename ${KERNEL}`\ninitrd\t\tinitrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
+ fi
+ else
+ if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
then
- if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
- then
- LINUX="title\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nroot\t\t(cd)\nkernel\t\t/`basename ${DESTDIR}`/`basename ${KERNEL}`\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
- else
- LINUX="title\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nroot\t\t(cd)\nkernel\t\t`basename ${KERNEL}`\ninitrd\t\tinitrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
- fi
+ LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nkernel /`basename ${DESTDIR}`/`basename ${KERNEL}`\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
else
- if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
- then
- LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nroot\t\t(cd)\nkernel /`basename ${DESTDIR}`/`basename ${KERNEL}`\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
- else
- LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nroot\t\t(cd)\nkernel `basename ${KERNEL}`\ninitrd\t\tinitrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
- fi
+ LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nkernel `basename ${KERNEL}`\ninitrd\t\tinitrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
fi
- done
- fi
+ fi
+ done
+fi
- LINUX="`echo ${LINUX} | sed -e 's#//#/#g'`"
+LINUX="`echo ${LINUX} | sed -e 's#//#/#g'`"
- # Assembling memtest configuration
- if [ -f "${DESTDIR}"/memtest ]
+# Assembling memtest configuration
+if [ -f "${DESTDIR}"/memtest ]
+then
+ if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
then
- if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
- then
- MEMTEST="title\t\tMemtest86+\nroot\t\t(cd)\nkernel\t\t/`basename ${DESTDIR}`/memtest"
- MEMTEST="`echo ${MEMTEST} | sed -e 's#//#/#g'`"
- else
- MEMTEST="title\t\tMemtest86+\nroot\t\t(cd)\nkernel\t\tmemtest"
- fi
+ MEMTEST="title\t\tMemtest86+\nkernel\t\t/`basename ${DESTDIR}`/memtest"
+ MEMTEST="`echo ${MEMTEST} | sed -e 's#//#/#g'`"
+ else
+ MEMTEST="title\t\tMemtest86+\nkernel\t\tmemtest"
fi
+fi
- mkdir -p binary/boot/grub
- cp -r "${LIVE_TEMPLATES}"/grub/* binary/boot/grub
+mkdir -p binary/boot/grub
+cp -r "${LIVE_TEMPLATES}"/grub/* binary/boot/grub
- if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
- then
+case ${LIVE_BINARY_IMAGE} in
+ iso)
cp chroot/usr/lib/grub/i386-pc/stage2_eltorito binary/boot/grub
- fi
+ ;;
- # Copying splash screen
- if [ -n "${LIVE_GRUB_SPLASH}" ]
- then
- # FIXME
- cp "${LIVE_GRUB_SPLASH}" binary/boot/grub
+ usb|hdd)
+ cp chroot/usr/lib/grub/i386-pc/stage1 chroot/usr/lib/grub/i386-pc/stage2 binary/boot/grub
+ ;;
+esac
- LIVE_SPLASH="splashimage /boot/grub/`basename ${LIVE_GRUB_SPLASH}`"
- fi
+# Copying splash screen
+if [ -n "${LIVE_GRUB_SPLASH}" ]
+then
+ # FIXME
+ cp "${LIVE_GRUB_SPLASH}" binary/boot/grub
- # Configure grub templates
+ LIVE_SPLASH="splashimage /boot/grub/`basename ${LIVE_GRUB_SPLASH}`"
+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.
@@ -200,23 +212,22 @@ root
LIVE_MEMTEST
EOF
- sed -i -e "s#LIVE_SPLASH#${LIVE_SPLASH}#" -e "s#LIVE_KERNEL_LIVE#${LINUX}#" -e "s#LIVE_KERNEL_INSTALL#${LIVE_KERNEL_INSTALL}#" -e "s#LIVE_MEMTEST#${MEMTEST}#" binary/boot/grub/menu.lst
- sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" binary/boot/grub/menu.lst
+sed -i -e "s#LIVE_SPLASH#${LIVE_SPLASH}#" -e "s#LIVE_KERNEL_LIVE#${LINUX}#" -e "s#LIVE_KERNEL_INSTALL#${LIVE_KERNEL_INSTALL}#" -e "s#LIVE_MEMTEST#${MEMTEST}#" binary/boot/grub/menu.lst
+sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" binary/boot/grub/menu.lst
- if [ -n "${PACKAGES}" ]
- then
- # Removing packages
- case "${LH_APT}" in
- apt|apt-get)
- Chroot "apt-get remove --purge --yes ${PACKAGES}"
- ;;
-
- aptitude)
- Chroot "aptitude purge --assume-yes ${PACKAGES}"
- ;;
- esac
- fi
+if [ -n "${PACKAGES}" ]
+then
+ # Removing packages
+ case "${LH_APT}" in
+ apt|apt-get)
+ Chroot "apt-get remove --purge --yes ${PACKAGES}"
+ ;;
- # Creating stage file
- Create_stagefile .stage/binary_grub
+ aptitude)
+ Chroot "aptitude purge --assume-yes ${PACKAGES}"
+ ;;
+esac
fi
+
+# Creating stage file
+Create_stagefile .stage/binary_grub
diff --git a/helpers/lh_binary_hdd b/helpers/lh_binary_hdd
index f41fbf4..5a450ab 100755
--- a/helpers/lh_binary_hdd
+++ b/helpers/lh_binary_hdd
@@ -22,16 +22,22 @@ 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/common
Read_conffile config/image
Set_defaults
+
for IMAGE in ${LIVE_BINARY_IMAGE}
do
if [ "${IMAGE}" = "hdd" ]
then
+ Breakpoint "binary_hdd: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_binary_includes b/helpers/lh_binary_includes
index aff6fa1..e343d72 100755
--- a/helpers/lh_binary_includes
+++ b/helpers/lh_binary_includes
@@ -22,12 +22,22 @@ 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/common
Read_conffile config/image
Set_defaults
+if [ "${LIVE_INCLUDES}" = "none" ]
+then
+ exit 0
+fi
+
+Breakpoint "binary_includes: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_binary_iso b/helpers/lh_binary_iso
index d7328c3..c77394e 100755
--- a/helpers/lh_binary_iso
+++ b/helpers/lh_binary_iso
@@ -22,9 +22,12 @@ 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/common
Read_conffile config/image
Set_defaults
@@ -32,6 +35,8 @@ for IMAGE in ${LIVE_BINARY_IMAGE}
do
if [ "${IMAGE}" = "iso" ]
then
+ Breakpoint "binary_iso: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_binary_linuximage b/helpers/lh_binary_linuximage
index 88f789c..bcdddc1 100755
--- a/helpers/lh_binary_linuximage
+++ b/helpers/lh_binary_linuximage
@@ -22,13 +22,17 @@ 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/common
Read_conffile config/image
Set_defaults
+Breakpoint "binary_linuximage: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_binary_localincludes b/helpers/lh_binary_localincludes
index 3327100..dc427d9 100755
--- a/helpers/lh_binary_localincludes
+++ b/helpers/lh_binary_localincludes
@@ -22,11 +22,17 @@ 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/common
+Read_conffile config/image
Set_defaults
+Breakpoint "binary_localincludes: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_binary_manifest b/helpers/lh_binary_manifest
index b0ae36c..e90f98b 100755
--- a/helpers/lh_binary_manifest
+++ b/helpers/lh_binary_manifest
@@ -22,11 +22,17 @@ USAGE="${PROGRAM} [--force]"
Arguments "${@}"
+Echo_debug "Init ${PROGRAM}"
+
# Reading configuration files
+Read_conffile config/bootstrap
+Read_conffile config/chroot
Read_conffile config/common
Read_conffile config/image
Set_defaults
+Breakpoint "binary_manifest: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_binary_md5sum b/helpers/lh_binary_md5sum
index c16b6d4..96e1007 100755
--- a/helpers/lh_binary_md5sum
+++ b/helpers/lh_binary_md5sum
@@ -22,11 +22,17 @@ USAGE="${PROGRAM} [--force]"
Arguments "${@}"
+Echo_debug "Init ${PROGRAM}"
+
# Reading configuration files
+Read_conffile config/bootstrap
+Read_conffile config/chroot
Read_conffile config/common
Read_conffile config/image
Set_defaults
+Breakpoint "binary_md5sum: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_binary_memtest86 b/helpers/lh_binary_memtest86
index 5232995..5f5e89c 100755
--- a/helpers/lh_binary_memtest86
+++ b/helpers/lh_binary_memtest86
@@ -22,13 +22,17 @@ 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/common
Read_conffile config/image
Set_defaults
+Breakpoint "binary_memtest86: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_binary_net b/helpers/lh_binary_net
index 2fded51..2acd2fb 100755
--- a/helpers/lh_binary_net
+++ b/helpers/lh_binary_net
@@ -22,12 +22,17 @@ 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/common
Read_conffile config/image
Set_defaults
+Breakpoint "binary_net: Init"
+
for IMAGE in ${LIVE_BINARY_IMAGE}
do
if [ "${IMAGE}" = "net" ]
@@ -51,6 +56,11 @@ do
fi
# Creating image file
+ if [ "`basename ${LIVE_SERVER_PATH}`" = "chroot" ]
+ then
+ mv chroot chroot.tmp
+ fi
+
mv binary "`basename ${LIVE_SERVER_PATH}`"
cd ..
@@ -60,6 +70,11 @@ do
mv "`basename ${LIVE_SERVER_PATH}`" binary
+ if [ "`basename ${LIVE_SERVER_PATH}`" = "chroot" ]
+ then
+ mv chroot.tmp chroot
+ fi
+
# Creating stage file
Create_stagefile .stage/binary_net
fi
diff --git a/helpers/lh_binary_rootfs b/helpers/lh_binary_rootfs
index 20ecdd3..a1d3d3a 100755
--- a/helpers/lh_binary_rootfs
+++ b/helpers/lh_binary_rootfs
@@ -22,11 +22,17 @@ USAGE="${PROGRAM} [--force]"
Arguments "${@}"
+Echo_debug "Init ${PROGRAM}"
+
# Reading configuration files
+Read_conffile config/bootstrap
+Read_conffile config/chroot
Read_conffile config/common
Read_conffile config/image
Set_defaults
+Breakpoint "binary_rootfs: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
Require_stagefile .stage/binary_chroot
diff --git a/helpers/lh_binary_syslinux b/helpers/lh_binary_syslinux
index b3dc446..3afc191 100755
--- a/helpers/lh_binary_syslinux
+++ b/helpers/lh_binary_syslinux
@@ -22,13 +22,17 @@ 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/common
Read_conffile config/image
Set_defaults
+Breakpoint "binary_syslinux: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_binary_usb b/helpers/lh_binary_usb
index 9371f67..228250e 100755
--- a/helpers/lh_binary_usb
+++ b/helpers/lh_binary_usb
@@ -22,12 +22,17 @@ 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/common
Read_conffile config/image
Set_defaults
+Breakpoint "binary_usb: Init"
+
for IMAGE in ${LIVE_BINARY_IMAGE}
do
if [ "${IMAGE}" = "usb" ]
diff --git a/helpers/lh_bootstrap b/helpers/lh_bootstrap
index c3a8dd9..2692a56 100755
--- a/helpers/lh_bootstrap
+++ b/helpers/lh_bootstrap
@@ -22,11 +22,18 @@ USAGE="${PROGRAM} [--force]"
Arguments "${@}"
+Echo_debug "Init ${PROGRAM}"
+
# Starting helper
Echo_debug "Init ${PROGRAM}"
+Breakpoint "bootstrap: Init"
+
# Reading configuration files
+Read_conffile config/bootstrap
+Read_conffile config/chroot
Read_conffile config/common
+Read_conffile config/image
Set_defaults
# Bootstrapping system
diff --git a/helpers/lh_bootstrap_cdebootstrap b/helpers/lh_bootstrap_cdebootstrap
index 2430cc8..9581d8c 100755
--- a/helpers/lh_bootstrap_cdebootstrap
+++ b/helpers/lh_bootstrap_cdebootstrap
@@ -25,14 +25,17 @@ Arguments "${@}"
# Ensure that a system is built as root
lh_testroot
-# Starting helper
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
Set_defaults
+Breakpoint "bootstrap_cdeboostrap: Init"
+
if [ "${LH_BOOTSTRAP}" != "cdebootstrap" ]
then
exit 0
@@ -59,9 +62,9 @@ then
CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --arch=${LIVE_ARCHITECTURE}"
fi
-if [ -n "${LIVE_DISTRIBUTION_CONFIG}" ]
+if [ -n "${LIVE_BOOTSTRAP_CONFIG}" ]
then
- CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --suite-config=${LIVE_DISTRIBUTION_CONFIG}"
+ CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --suite-config=${LIVE_BOOTSTRAP_CONFIG}"
fi
if [ "${LIVE_PACKAGES_LISTS}" != "minimal" ] && [ "${LIVE_PACKAGES_LISTS}" != "mini" ]
@@ -71,17 +74,17 @@ else
CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --flavour=minimal"
fi
-if [ "${DEBUG}" = "true" ]
+if [ "${LH_DEBUG}" = "true" ]
then
CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --debug"
fi
-if [ "${QUIET}" = "true" ]
+if [ "${LH_QUIET}" = "true" ]
then
CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --quiet"
fi
-if [ "${VERBOSE}" = "true" ]
+if [ "${LH_VERBOSE}" = "true" ]
then
CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --verbose"
fi
diff --git a/helpers/lh_bootstrap_debootstrap b/helpers/lh_bootstrap_debootstrap
index 87dd30e..a32c491 100755
--- a/helpers/lh_bootstrap_debootstrap
+++ b/helpers/lh_bootstrap_debootstrap
@@ -25,14 +25,17 @@ Arguments "${@}"
# Ensure that a system is built as root
lh_testroot
-# Starting helper
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
Set_defaults
+Breakpoint "bootstrap_debootstrap: Init"
+
if [ "${LH_BOOTSTRAP}" != "debootstrap" ]
then
exit 0
@@ -64,7 +67,7 @@ then
LIVE_DEBOOTSTRAP_SCRIPT="/usr/lib/debootstrap/scripts/${LIVE_BOOTSTRAP_CONFIG}"
fi
-if [ "${VERBOSE}" = "true" ]
+if [ "${LH_VERBOSE}" = "true" ]
then
DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --verbose"
fi
diff --git a/helpers/lh_build b/helpers/lh_build
index 077b05a..20ae36d 100755
--- a/helpers/lh_build
+++ b/helpers/lh_build
@@ -22,6 +22,9 @@ USAGE="${PROGRAM} [--force]"
Arguments "${@}"
+Echo_debug "Init ${PROGRAM}"
+Breakpoint "build: Init"
+
# Bootstrapping system
lh_bootstrap "${@}"
diff --git a/helpers/lh_chroot b/helpers/lh_chroot
index 5e7ad8f..670c410 100755
--- a/helpers/lh_chroot
+++ b/helpers/lh_chroot
@@ -22,11 +22,17 @@ 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/common
+Read_conffile config/image
Set_defaults
+Breakpoint "chroot: Init"
+
# Configuring chroot
lh_chroot_proc install "${@}"
lh_chroot_sysfs install "${@}"
diff --git a/helpers/lh_chroot_apt b/helpers/lh_chroot_apt
index e234c39..47107e7 100755
--- a/helpers/lh_chroot_apt
+++ b/helpers/lh_chroot_apt
@@ -22,11 +22,17 @@ USAGE="${PROGRAM} {install|remove} [--force]"
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
Set_defaults
+Breakpoint "chroot_apt: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_chroot_debianchroot b/helpers/lh_chroot_debianchroot
index 1c926eb..b0f3a57 100755
--- a/helpers/lh_chroot_debianchroot
+++ b/helpers/lh_chroot_debianchroot
@@ -22,11 +22,17 @@ USAGE="${PROGRAM} {install|remove} [--force]"
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
Set_defaults
+Breakpoint "chroot_debianchroot: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_chroot_hacks b/helpers/lh_chroot_hacks
index 9422226..bc6b0d4 100755
--- a/helpers/lh_chroot_hacks
+++ b/helpers/lh_chroot_hacks
@@ -22,11 +22,17 @@ 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/common
+Read_conffile config/image
Set_defaults
+Breakpoint "chroot_hacks: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_chroot_hooks b/helpers/lh_chroot_hooks
index 47dea53..85386a8 100755
--- a/helpers/lh_chroot_hooks
+++ b/helpers/lh_chroot_hooks
@@ -22,11 +22,17 @@ 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/common
+Read_conffile config/image
Set_defaults
+Breakpoint "chroot_hooks: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_chroot_hosts b/helpers/lh_chroot_hosts
index 518ef30..52784d5 100755
--- a/helpers/lh_chroot_hosts
+++ b/helpers/lh_chroot_hosts
@@ -22,11 +22,17 @@ USAGE="${PROGRAM} {install|remove} [--force]"
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
Set_defaults
+Breakpoint "chroot_hosts: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_chroot_interactive b/helpers/lh_chroot_interactive
index 82fd986..ac90f89 100755
--- a/helpers/lh_chroot_interactive
+++ b/helpers/lh_chroot_interactive
@@ -22,11 +22,17 @@ 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/common
+Read_conffile config/image
Set_defaults
+Breakpoint "chroot_interactive: Init"
+
if [ "${LIVE_INTERACTIVE}" != "disabled" ]
then
# Requiring stage file
diff --git a/helpers/lh_chroot_linuximage b/helpers/lh_chroot_linuximage
index c9443dd..0af6e18 100755
--- a/helpers/lh_chroot_linuximage
+++ b/helpers/lh_chroot_linuximage
@@ -22,11 +22,17 @@ USAGE="${PROGRAM} {install|remove} [--force]"
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
Set_defaults
+Breakpoint "chroot_linuximage: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_chroot_localhooks b/helpers/lh_chroot_localhooks
index 94d9684..07a5c9c 100755
--- a/helpers/lh_chroot_localhooks
+++ b/helpers/lh_chroot_localhooks
@@ -22,11 +22,17 @@ 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/common
+Read_conffile config/image
Set_defaults
+Breakpoint "chroot_localhooks: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_chroot_localincludes b/helpers/lh_chroot_localincludes
index 05ca4ec..777cdd1 100755
--- a/helpers/lh_chroot_localincludes
+++ b/helpers/lh_chroot_localincludes
@@ -22,11 +22,17 @@ 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/common
+Read_conffile config/image
Set_defaults
+Breakpoint "chroot_localincludes: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_chroot_localization b/helpers/lh_chroot_localization
index a5d7de6..4abaf2d 100755
--- a/helpers/lh_chroot_localization
+++ b/helpers/lh_chroot_localization
@@ -22,11 +22,17 @@ 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/common
+Read_conffile config/image
Set_defaults
+Breakpoint "chroot_localization: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_chroot_localpackages b/helpers/lh_chroot_localpackages
index b285527..6beee2d 100755
--- a/helpers/lh_chroot_localpackages
+++ b/helpers/lh_chroot_localpackages
@@ -22,11 +22,17 @@ 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/common
+Read_conffile config/image
Set_defaults
+Breakpoint "chroot_localpackages: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_chroot_localpackageslists b/helpers/lh_chroot_localpackageslists
index 1989826..a8459ef 100755
--- a/helpers/lh_chroot_localpackageslists
+++ b/helpers/lh_chroot_localpackageslists
@@ -22,11 +22,17 @@ 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/common
+Read_conffile config/image
Set_defaults
+Breakpoint "chroot_localpackageslists: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_chroot_packages b/helpers/lh_chroot_packages
index a0f5b8a..5b38fcc 100755
--- a/helpers/lh_chroot_packages
+++ b/helpers/lh_chroot_packages
@@ -22,12 +22,17 @@ 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/common
+Read_conffile config/image
Set_defaults
+Breakpoint "chroot_packages: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_chroot_packageslists b/helpers/lh_chroot_packageslists
index 3dfda53..18405bd 100755
--- a/helpers/lh_chroot_packageslists
+++ b/helpers/lh_chroot_packageslists
@@ -22,11 +22,17 @@ 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/common
+Read_conffile config/image
Set_defaults
+Breakpoint "chroot_packageslists: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_chroot_proc b/helpers/lh_chroot_proc
index ac0dd17..b689cc6 100755
--- a/helpers/lh_chroot_proc
+++ b/helpers/lh_chroot_proc
@@ -22,11 +22,20 @@ USAGE="${PROGRAM} {install|remove} [--force]"
Arguments "${@}"
+# Ensure that a system is built as root
+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
Set_defaults
+Breakpoint "chroot_proc: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_chroot_resolv b/helpers/lh_chroot_resolv
index d319e96..db68e8c 100755
--- a/helpers/lh_chroot_resolv
+++ b/helpers/lh_chroot_resolv
@@ -22,11 +22,17 @@ USAGE="${PROGRAM} {install|remove} [--force]"
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
Set_defaults
+Breakpoint "chroot_resolv: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_chroot_sources b/helpers/lh_chroot_sources
index 6037c4f..af85217 100755
--- a/helpers/lh_chroot_sources
+++ b/helpers/lh_chroot_sources
@@ -22,13 +22,17 @@ USAGE="${PROGRAM} {install|remove} [--force]"
Arguments "${@}"
+Echo_debug "Init ${PROGRAM}"
+
# Reading configuration files
-Read_conffile config/common
+Read_conffile config/bootstrap
Read_conffile config/chroot
-Read_conffile config/bootstrap #FIXME
+Read_conffile config/common
Read_conffile config/image
Set_defaults
+Breakpoint "chroot_sources: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
@@ -65,11 +69,37 @@ case "${1}" in
fi
# Check local sources.list
- if [ -f config/sources.list.build ]
+ if ls config/chroot_sources/*.build &> /dev/null
then
echo "" >> chroot/etc/apt/sources.list
echo "# Custom repositories" >> chroot/etc/apt/sources.list
- cat config/sources.list.build >> chroot/etc/apt/sources.list
+
+ for FILE in config/chroot_sources/*.build
+ do
+ cat ${FILE} >> chroot/etc/apt/sources.list
+ done
+ fi
+
+ # 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
+
+ # 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 aptitude
@@ -87,6 +117,13 @@ case "${1}" in
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
+
# Creating stage file
Create_stagefile .stage/chroot_sources
;;
@@ -95,6 +132,13 @@ case "${1}" in
# Configure generic indices
if [ "${LH_APT_GENERIC}" = "enabled" ]
then
+ # Don't do anything if it's not required
+ if [ "${LIVE_MIRROR_BUILD}" = "${LIVE_MIRROR_IMAGE}" ] && \
+ [ "${LIVE_MIRROR_BUILD_SECURITY}" = "${LIVE_MIRROR_IMAGE_SECURITY}" ]
+ then
+ exit 0
+ fi
+
# Cleaning apt list cache
rm -rf chroot/var/lib/apt/lists
mkdir -p chroot/var/lib/apt/lists/partial
@@ -120,11 +164,26 @@ case "${1}" in
fi
# Check local sources.list
- if [ -f config/sources.list.image ]
+ if ls config/chroot_sources/*.image &> /dev/null
then
echo "" >> chroot/etc/apt/sources.list
echo "# Custom repositories" >> chroot/etc/apt/sources.list
- cat config/sources.list.image >> chroot/etc/apt/sources.list
+
+ for FILE in config/chroot_sources/*.image
+ do
+ cat ${FILE} >> chroot/etc/apt/sources.list
+ done
+ fi
+
+ # Check local gpg keys
+ if ls config/chroot_sources/*.image.gpg &> /dev/null
+ then
+ for FILE in config/chroot_sources/*.image.gpg
+ do
+ cp ${FILE} chroot/root
+ Chroot "apt-key add /root/`basename ${FILE}`"
+ rm -f chroot/root/`basename ${FILE}`
+ done
fi
case "${LH_APT}" in
diff --git a/helpers/lh_chroot_symlinks b/helpers/lh_chroot_symlinks
index 850c8f8..a2413e5 100755
--- a/helpers/lh_chroot_symlinks
+++ b/helpers/lh_chroot_symlinks
@@ -22,11 +22,17 @@ 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/common
+Read_conffile config/image
Set_defaults
+Breakpoint "chroot_symlinks: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_chroot_sysfs b/helpers/lh_chroot_sysfs
index d350541..ae9c0b4 100755
--- a/helpers/lh_chroot_sysfs
+++ b/helpers/lh_chroot_sysfs
@@ -22,11 +22,20 @@ USAGE="${PROGRAM} {install|remove} [--force]"
Arguments "${@}"
+# Ensure that a system is built as root
+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
Set_defaults
+Breakpoint "chroot_sysfs: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_chroot_sysvinit b/helpers/lh_chroot_sysvinit
index 7817b47..48eae43 100755
--- a/helpers/lh_chroot_sysvinit
+++ b/helpers/lh_chroot_sysvinit
@@ -22,11 +22,17 @@ 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/common
+Read_conffile config/image
Set_defaults
+Breakpoint "chroot_sysvinit: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_chroot_sysvrc b/helpers/lh_chroot_sysvrc
index ec27ad2..f864854 100755
--- a/helpers/lh_chroot_sysvrc
+++ b/helpers/lh_chroot_sysvrc
@@ -22,11 +22,17 @@ USAGE="${PROGRAM} {install|remove} [--force]"
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
Set_defaults
+Breakpoint "chroot_sysvrc: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_chroot_tasks b/helpers/lh_chroot_tasks
index 33a8464..7427e97 100755
--- a/helpers/lh_chroot_tasks
+++ b/helpers/lh_chroot_tasks
@@ -22,11 +22,17 @@ 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/common
+Read_conffile config/image
Set_defaults
+Breakpoint "chroot_tasks: Init"
+
# Requiring stage file
Require_stagefile .stage/bootstrap
diff --git a/helpers/lh_clean b/helpers/lh_clean
index d884ebe..dde83d5 100755
--- a/helpers/lh_clean
+++ b/helpers/lh_clean
@@ -22,8 +22,13 @@ USAGE="${PROGRAM} [all|cache|chroot|binary|lock|purge|stage|source]"
Arguments "${@}"
+Echo_debug "Init ${PROGRAM}"
+
# Reading configuration files
+Read_conffile config/bootstrap
+Read_conffile config/chroot
Read_conffile config/common
+Read_conffile config/image
Set_defaults
case "${1}" in
diff --git a/helpers/lh_config b/helpers/lh_config
index 398b102..0d42477 100755
--- a/helpers/lh_config
+++ b/helpers/lh_config
@@ -22,6 +22,8 @@ USAGE="${PROGRAM} [--force]"
Arguments "${@}"
+Echo_debug "Init ${PROGRAM}"
+
if [ "${1}" != "newconfig" ]
then
# Source existing configuration
@@ -34,6 +36,8 @@ fi
# Setting defaults
Set_defaults
+Breakpoint "config: Init"
+
# Creating configuration directory
install -d -m 0755 "${LIVE_ROOT}"/config || true
@@ -41,6 +45,10 @@ install -d -m 0755 "${LIVE_ROOT}"/config || true
cat > "${LIVE_ROOT}"/config/common << EOF
# config/common: configuration for live-helper(7)
+# \$LH_MODE: set distribution mode
+# (Default: ${LH_MODE})
+LH_MODE="${LH_MODE}"
+
# \$LH_APT: set package manager
# (Default: ${LH_APT})
LH_APT="${LH_APT}"
@@ -96,6 +104,28 @@ LH_LOSETUP="${LH_LOSETUP}"
# \$LIVE_ROOT: set the root directory
# (Default: ${LIVE_ROOT})
LIVE_ROOT="${LIVE_ROOT}"
+
+# Live-helper options
+
+# \$LH_BREAKPOINTS: enable breakpoints
+# (Default: ${LH_BREAKPOINTS})
+LH_BREAKPOINTS="${LH_BREAKPOINTS}"
+
+# \$LH_DEBUG: enable debug
+# (Default: ${LH_DEBUG})
+LH_DEBUG="${LH_DEBUG}"
+
+# \$LH_FORCE: enable force
+# (Default: ${LH_FORCE})
+LH_FORCE="${LH_FORCE}"
+
+# \$LH_QUIET: enable quiet
+# (Default: ${LH_QUIET})
+LH_QUIET="${LH_QUIET}"
+
+# \$LH_VERBOSE: enable verbose
+# (Default: ${LH_VERBOSE})
+LH_VERBOSE="${LH_VERBOSE}"
EOF
# Creating lh_chroot_* configuration
@@ -110,6 +140,10 @@ LIVE_KERNEL_FLAVOUR="${LIVE_KERNEL_FLAVOUR}"
# (Default: autodetected)
LIVE_KERNEL_PACKAGES="${LIVE_KERNEL_PACKAGES}"
+# \$LIVE_KEYRING_PACKAGES: set the keyring packages
+# (Default: empty)
+LIVE_KEYRING_PACKAGES="${LIVE_KEYRING_PACKAGES}"
+
# \$LIVE_LANGUAGE: set the language to use
# (Default: empty)
LIVE_LANGUAGE="${LIVE_LANGUAGE}"
@@ -148,6 +182,7 @@ install -d -m 0755 "${LIVE_ROOT}"/config/chroot_localhooks || true
install -d -m 0755 "${LIVE_ROOT}"/config/chroot_localincludes || true
install -d -m 0755 "${LIVE_ROOT}"/config/chroot_localpackages || true
install -d -m 0755 "${LIVE_ROOT}"/config/chroot_localpackageslists || true
+install -d -m 0755 "${LIVE_ROOT}"/config/chroot_sources || true
# Creating lh_bootstrap_* configuration
cat > "${LIVE_ROOT}"/config/bootstrap << EOF
diff --git a/helpers/lh_losetup b/helpers/lh_losetup
index fb7141e..e3b7148 100755
--- a/helpers/lh_losetup
+++ b/helpers/lh_losetup
@@ -22,10 +22,17 @@ USAGE="${PROGRAM} <device> <file> <partition>"
Arguments "${@}"
+Echo_debug "Init ${PROGRAM}"
+
# Reading configuration files
+Read_conffile config/bootstrap
+Read_conffile config/chroot
Read_conffile config/common
+Read_conffile config/image
Set_defaults
+Breakpoint "losetup: Init"
+
if [ -z "${1}" ]
then
DEVICE="`${LH_LOSETUP} -f`"
diff --git a/helpers/lh_source b/helpers/lh_source
index 6e31cd9..b8892d2 100755
--- a/helpers/lh_source
+++ b/helpers/lh_source
@@ -22,11 +22,17 @@ USAGE="${PROGRAM} [--force]"
Arguments "${@}"
+Echo_debug "Init ${PROGRAM}"
+
# Reading configuration files
+Read_conffile config/bootstrap
+Read_conffile config/chroot
Read_conffile config/common
Read_conffile config/image
Set_defaults
+Breakpoint "source: Init"
+
# Enabling network in chroot
lh_chroot_hosts install "${@}"
lh_chroot_resolv install "${@}"
diff --git a/helpers/lh_source_config b/helpers/lh_source_config
index 8701653..3982696 100755
--- a/helpers/lh_source_config
+++ b/helpers/lh_source_config
@@ -22,11 +22,17 @@ USAGE="${PROGRAM} [--force]"
Arguments "${@}"
+Echo_debug "Init ${PROGRAM}"
+
# Reading configuration files
+Read_conffile config/bootstrap
+Read_conffile config/chroot
Read_conffile config/common
Read_conffile config/image
Set_defaults
+Breakpoint "source_config: Init"
+
if [ "${LIVE_SOURCE}" = "enabled" ]
then
# Requiring stage file
diff --git a/helpers/lh_source_download b/helpers/lh_source_download
index c1903f8..a3ec267 100755
--- a/helpers/lh_source_download
+++ b/helpers/lh_source_download
@@ -22,11 +22,17 @@ USAGE="${PROGRAM} [--force]"
Arguments "${@}"
+Echo_debug "Init ${PROGRAM}"
+
# Reading configuration files
+Read_conffile config/bootstrap
+Read_conffile config/chroot
Read_conffile config/common
Read_conffile config/image
Set_defaults
+Breakpoint "source_download: Init"
+
if [ "${LIVE_SOURCE}" = "enabled" ]
then
# Requiring stage file
diff --git a/helpers/lh_source_generic b/helpers/lh_source_generic
index 81ba3a5..3740fe3 100755
--- a/helpers/lh_source_generic
+++ b/helpers/lh_source_generic
@@ -22,11 +22,17 @@ USAGE="${PROGRAM} [--force]"
Arguments "${@}"
+Echo_debug "Init ${PROGRAM}"
+
# Reading configuration files
+Read_conffile config/bootstrap
+Read_conffile config/chroot
Read_conffile config/common
Read_conffile config/image
Set_defaults
+Breakpoint "source_generic: Init"
+
if [ "${LIVE_SOURCE}" = "disabled" ]
then
exit 0
diff --git a/helpers/lh_source_hdd b/helpers/lh_source_hdd
index 9fbdf07..a3bdd8c 100755
--- a/helpers/lh_source_hdd
+++ b/helpers/lh_source_hdd
@@ -22,11 +22,17 @@ USAGE="${PROGRAM} [--force]"
Arguments "${@}"
+Echo_debug "Init ${PROGRAM}"
+
# Reading configuration files
+Read_conffile config/bootstrap
+Read_conffile config/chroot
Read_conffile config/common
Read_conffile config/image
Set_defaults
+Breakpoint "source_hdd: Init"
+
if [ "${LIVE_SOURCE}" = "disabled" ]
then
exit 0
diff --git a/helpers/lh_source_iso b/helpers/lh_source_iso
index 25dcb5f..f5b18cc 100755
--- a/helpers/lh_source_iso
+++ b/helpers/lh_source_iso
@@ -22,11 +22,17 @@ USAGE="${PROGRAM} [--force]"
Arguments "${@}"
+Echo_debug "Init ${PROGRAM}"
+
# Reading configuration files
+Read_conffile config/bootstrap
+Read_conffile config/chroot
Read_conffile config/common
Read_conffile config/image
Set_defaults
+Breakpoint "source_iso: Init"
+
if [ "${LIVE_SOURCE}" = "disabled" ]
then
exit 0
diff --git a/helpers/lh_source_md5sum b/helpers/lh_source_md5sum
index 70a2854..8fc2b39 100755
--- a/helpers/lh_source_md5sum
+++ b/helpers/lh_source_md5sum
@@ -22,11 +22,17 @@ USAGE="${PROGRAM} [--force]"
Arguments "${@}"
+Echo_debug "Init ${PROGRAM}"
+
# Reading configuration files
+Read_conffile config/bootstrap
+Read_conffile config/chroot
Read_conffile config/common
Read_conffile config/image
Set_defaults
+Breakpoint "source_md5sum: Init"
+
if [ "${LIVE_SOURCE}" = "enabled" ]
then
# Requiring stage file
diff --git a/helpers/lh_source_net b/helpers/lh_source_net
index 9a3c72d..a149d5c 100755
--- a/helpers/lh_source_net
+++ b/helpers/lh_source_net
@@ -22,11 +22,17 @@ USAGE="${PROGRAM} [--force]"
Arguments "${@}"
+Echo_debug "Init ${PROGRAM}"
+
# Reading configuration files
+Read_conffile config/bootstrap
+Read_conffile config/chroot
Read_conffile config/common
Read_conffile config/image
Set_defaults
+Breakpoint "source_net: Init"
+
if [ "${LIVE_SOURCE}" = "disabled" ]
then
exit 0
diff --git a/helpers/lh_source_usb b/helpers/lh_source_usb
index 8f88715..bec69e0 100755
--- a/helpers/lh_source_usb
+++ b/helpers/lh_source_usb
@@ -22,12 +22,17 @@ 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/common
Read_conffile config/image
Set_defaults
+Breakpoint "source_usb: Init"
+
if [ "${LIVE_SOURCE}" = "disabled" ]
then
exit 0
diff --git a/helpers/lh_testroot b/helpers/lh_testroot
index f30c655..e694529 100755
--- a/helpers/lh_testroot
+++ b/helpers/lh_testroot
@@ -22,7 +22,7 @@ USAGE="${PROGRAM} [--force]"
Arguments "${@}"
-set -e
+Echo_debug "Init ${PROGRAM}"
# Checking user account
if [ "`id -u`" -ne "0" ]
diff --git a/helpers/make-live b/helpers/make-live
index bab264b..d92bebc 100755
--- a/helpers/make-live
+++ b/helpers/make-live
@@ -31,13 +31,13 @@ done
# Set static variables
PROGRAM="`basename ${0}`"
DESCRIPTION="utility to build Debian Live systems"
-USAGE="${PROGRAM} [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] [--genisoimage genisoimage|mkisofs] [--losetup losetup|losetup.org] [-r|--root DIRECTORY] [-a|--architecture ARCHITECTURE] [-d|--distribution testing|unstable|etch|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 PACKAGES] [-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] [--memtest86 enabled|disabled] [--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] [--debug] [--force] [--quiet] [--verbose]"
+USAGE="${PROGRAM} [config] [--mode MODE] [--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] [--genisoimage genisoimage|mkisofs] [--losetup losetup|losetup.org] [-r|--root DIRECTORY] [-a|--architecture ARCHITECTURE] [-d|--distribution testing|unstable|etch|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\"] [-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] [--memtest86 enabled|disabled] [--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]"
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"
Local_arguments ()
{
- ARGUMENTS="`getopt --longoptions apt:,apt-ftpproxy:,apt-httpproxy:,apt-generic:,apt-pdiffs:,apt-recommends:,apt-secure:,bootstrap:,cache:,debconf-frontend:,debconf-priority:,genisoimage:,losetup:,root:,architecture:,distribution:,distribution-config:,flavour:,mirror-local:,mirror-local-security:,mirror-generic:,mirror-generic-security:,sections:,interactive:,kernel:,kernel-packages:,language:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,bootappend:,encryption:,username:,hostname:,filesystem:,memtest86:,iso-volume:,server-address:,server-path:,source:,bootloader:,grub-splash:,syslinux-splash:,binary-image:,binary-source:,includes:,templates:,help,usage,version,force,debug,quiet,verbose --name=${PROGRAM} --options r:a:d:f:m:k:l:p:e:b:s:huv --shell sh -- "${@}"`"
+ ARGUMENTS="`getopt --longoptions mode:,apt:,apt-ftpproxy:,apt-httpproxy:,apt-generic:,apt-pdiffs:,apt-recommends:,apt-secure:,bootstrap:,cache:,debconf-frontend:,debconf-priority:,genisoimage:,losetup:,root:,architecture:,distribution:,distribution-config:,flavour:,mirror-local:,mirror-local-security:,mirror-generic:,mirror-generic-security:,sections:,interactive:,kernel:,kernel-packages:,keyring-packages:,language:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,bootappend:,encryption:,username:,hostname:,filesystem:,memtest86:,iso-volume:,server-address:,server-path:,source:,bootloader:,grub-splash:,syslinux-splash:,binary-image:,binary-source:,includes:,templates:,help,usage,version,force,breakpoints,debug,quiet,verbose --name=${PROGRAM} --options r:a:d:f:m:k:l:p:e:b:s:huv --shell sh -- "${@}"`"
if [ "${?}" != "0" ]
then
@@ -56,6 +56,10 @@ Local_arguments ()
do
case "${1}" in
# common
+ --mode)
+ LH_MODE="${2}"; shift 2
+ ;;
+
--apt)
LH_APT="${2}"; shift 2
;;
@@ -163,6 +167,10 @@ Local_arguments ()
LIVE_KERNEL_PACKAGES="${2}"; shift 2
;;
+ --keyring-packages)
+ LIVE_KEYRING_PACKAGS="${2}"; shift 2
+ ;;
+
-l|--language)
LIVE_LANGUAGE="${2}"; shift 2
;;
@@ -273,20 +281,24 @@ Local_arguments ()
Version; shift
;;
+ --breakpoints)
+ LH_BREAKPOINTS="enabled"; shift
+ ;;
+
--debug)
- DEBUG="true"; shift
+ LH_DEBUG="enabled"; shift
;;
--force)
- FORCE="true"; shift
+ LH_FORCE="enabled"; shift
;;
--quiet)
- QUIET="true"; shift
+ LH_QUIET="enabled"; shift
;;
--verbose)
- VERBOSE="true"; shift
+ LH_VERBOSE="enabled"; shift
;;
--)
@@ -321,24 +333,29 @@ Main ()
Local_arguments "${@}"
# Configuring (this is really shit!)
- LH_APT="${LH_APT}" LH_APT_FTPPROXY="${LH_APT_FTPPROXY}" LH_APT_HTTPPROXY="${LH_APT_HTTPPROXY}" LH_APT_GENERIC="${LH_APT_GENERIC}" LH_APT_PDIFFS="${LH_APT_PDIFFS}" LH_APT_RECOMMENDS="${LH_APT_RECOMMENDS}" LH_APT_SECURE="${LH_APT_SECURE}" LH_BOOTSTRAP="${LH_BOOTSTRAP}" LH_CACHE="${LH_CACHE}" LH_DEBCONF_FRONTEND="${LH_DEBCONF_FRONTEND}" LH_DEBCONF_PRIORITY="${LH_DEBCONF_PRIORITY}" LH_GENISOIMAGE="${LH_GENISOIMAGE}" LIVE_ROOT="${LIVE_ROOT}" LIVE_ARCHITECTURE="${LIVE_ARCHITECTURE}" LIVE_DISTRIBUTION="${LIVE_DISTRIBUTION}" LIVE_DISTRIBUTION_CONFIG="${LIVE_DISTRIBUTION_CONFIG}" LIVE_BOOTSTRAP_FLAVOUR="${LIVE_BOOTSTRAP_FLAVOUR}" LIVE_MIRROR_BUILD="${LIVE_MIRROR_BUILD}" LIVE_MIRROR_BUILD_SECURITY="${LIVE_MIRROR_BUILD_SECURITY}" LIVE_MIRROR_IMAGE="${LIVE_MIRROR_IMAGE}" LIVE_MIRROR_IMAGE_SECURITY="${LIVE_MIRROR_IMAGE_SECURITY}" LIVE_SECTIONS="${LIVE_SECTIONS}" LIVE_INTERACTIVE="${LIVE_INTERACTIVE}" LIVE_KERNEL_FLAVOUR="${LIVE_KERNEL_FLAVOUR}" LIVE_KERNEL_PACKAGES="${LIVE_KERNEL_PACKAGES}" LIVE_LANGUAGE="${LIVE_LANGUAGE}" LIVE_PACKAGES="${LIVE_PACKAGES}" LIVE_PACKAGES_LISTS="${LIVE_PACKAGES_LISTS}" LIVE_TASKS="${LIVE_TASKS}" LIVE_SECURITY="${LIVE_SECURITY}" LIVE_SYMLINKS="${LIVE_SYMLINKS}" LIVE_SYSVINIT="${LIVE_SYSVINIT}" LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND}" LIVE_ENCRYPTION="${LIVE_ENCRYPTION}" LIVE_USERNAME="${LIVE_USERNAME}" LIVE_HOSTNAME="${LIVE_HOSTNAME}" LIVE_FILESYSTEM="${LIVE_FILESYSTEM}" LIVE_MEMTEST86="${LIVE_MEMTEST86}" LIVE_ISO_VOLUME="${LIVE_ISO_VOLUME}" LIVE_SERVER_ADDRESS="${LIVE_SERVER_ADDRESS}" LIVE_SERVER_PATH="${LIVE_SERVER_PATH}" LIVE_SOURCE="${LIVE_SOURCE}" LIVE_BOOTLOADER="${LIVE_BOOTLOADER}" LIVE_GRUB_SPLASH="${LIVE_GRUB_SPLASH}" LIVE_SYSLINUX_SPLASH="${LIVE_SYSLINUX_SPLASH}" LIVE_BINARY_IMAGE="${LIVE_BINARY_IMAGE}" LIVE_SOURCE_IMAGE="${LIVE_SOURCE_IMAGE}" LIVE_INCLUDES="${LIVE_INCLUDES}" LIVE_TEMPLATES="${LIVE_TEMPLATES}" lh_config newconfig
+ LH_MODE="${LH_MODE}" LH_APT="${LH_APT}" LH_APT_FTPPROXY="${LH_APT_FTPPROXY}" LH_APT_HTTPPROXY="${LH_APT_HTTPPROXY}" LH_APT_GENERIC="${LH_APT_GENERIC}" LH_APT_PDIFFS="${LH_APT_PDIFFS}" LH_APT_RECOMMENDS="${LH_APT_RECOMMENDS}" LH_APT_SECURE="${LH_APT_SECURE}" LH_BOOTSTRAP="${LH_BOOTSTRAP}" LH_CACHE="${LH_CACHE}" LH_DEBCONF_FRONTEND="${LH_DEBCONF_FRONTEND}" LH_DEBCONF_PRIORITY="${LH_DEBCONF_PRIORITY}" LH_GENISOIMAGE="${LH_GENISOIMAGE}" LIVE_ROOT="${LIVE_ROOT}" LIVE_ARCHITECTURE="${LIVE_ARCHITECTURE}" LIVE_DISTRIBUTION="${LIVE_DISTRIBUTION}" LIVE_DISTRIBUTION_CONFIG="${LIVE_DISTRIBUTION_CONFIG}" LIVE_BOOTSTRAP_FLAVOUR="${LIVE_BOOTSTRAP_FLAVOUR}" LIVE_MIRROR_BUILD="${LIVE_MIRROR_BUILD}" LIVE_MIRROR_BUILD_SECURITY="${LIVE_MIRROR_BUILD_SECURITY}" LIVE_MIRROR_IMAGE="${LIVE_MIRROR_IMAGE}" LIVE_MIRROR_IMAGE_SECURITY="${LIVE_MIRROR_IMAGE_SECURITY}" LIVE_SECTIONS="${LIVE_SECTIONS}" LIVE_INTERACTIVE="${LIVE_INTERACTIVE}" LIVE_KERNEL_FLAVOUR="${LIVE_KERNEL_FLAVOUR}" LIVE_KERNEL_PACKAGES="${LIVE_KERNEL_PACKAGES}" LIVE_KEYRING_PACKAGES="${LIVE_KEYRING_PACKAGES}" LIVE_LANGUAGE="${LIVE_LANGUAGE}" LIVE_PACKAGES="${LIVE_PACKAGES}" LIVE_PACKAGES_LISTS="${LIVE_PACKAGES_LISTS}" LIVE_TASKS="${LIVE_TASKS}" LIVE_SECURITY="${LIVE_SECURITY}" LIVE_SYMLINKS="${LIVE_SYMLINKS}" LIVE_SYSVINIT="${LIVE_SYSVINIT}" LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND}" LIVE_ENCRYPTION="${LIVE_ENCRYPTION}" LIVE_USERNAME="${LIVE_USERNAME}" LIVE_HOSTNAME="${LIVE_HOSTNAME}" LIVE_FILESYSTEM="${LIVE_FILESYSTEM}" LIVE_MEMTEST86="${LIVE_MEMTEST86}" LIVE_ISO_VOLUME="${LIVE_ISO_VOLUME}" LIVE_SERVER_ADDRESS="${LIVE_SERVER_ADDRESS}" LIVE_SERVER_PATH="${LIVE_SERVER_PATH}" LIVE_SOURCE="${LIVE_SOURCE}" LIVE_BOOTLOADER="${LIVE_BOOTLOADER}" LIVE_GRUB_SPLASH="${LIVE_GRUB_SPLASH}" LIVE_SYSLINUX_SPLASH="${LIVE_SYSLINUX_SPLASH}" LIVE_BINARY_IMAGE="${LIVE_BINARY_IMAGE}" LIVE_SOURCE_IMAGE="${LIVE_SOURCE_IMAGE}" LIVE_INCLUDES="${LIVE_INCLUDES}" LIVE_TEMPLATES="${LIVE_TEMPLATES}" lh_config newconfig
+
+ if [ "${LH_BREAKPOINTS}" = "enabled" ]
+ then
+ OPTIONS="${OPTIONS} --breakpoints"
+ fi
- if [ "${DEBUG}" = "true" ]
+ if [ "${LH_DEBUG}" = "enabled" ]
then
OPTIONS="${OPTIONS} --debug"
fi
- if [ "${FORCE}" = "true" ]
+ if [ "${LH_FORCE}" = "enabled" ]
then
OPTIONS="${OPTIONS} --force"
fi
- if [ "${QUIET}" = "true" ]
+ if [ "${LH_QUIET}" = "enabled" ]
then
OPTIONS="${OPTIONS} --quiet"
fi
- if [ "${VERBOSE}" = "true" ]
+ if [ "${LH_VERBOSE}" = "enabled" ]
then
OPTIONS="${OPTIONS} --verbose"
fi