summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:04:49 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:18:29 +0100
commit1863ed88740575342008ac5f694d03e944bcece2 (patch)
tree58272f72528cedb7af31ee6e6c2c0f7fbd602160 /helpers
parentda353a5231ad925013d01065768864307c70651a (diff)
downloadvyos-live-build-1863ed88740575342008ac5f694d03e944bcece2.tar.gz
vyos-live-build-1863ed88740575342008ac5f694d03e944bcece2.zip
Adding live-helper 1.0~a5-1.
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 d9726252b..13266370c 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 5cde421d3..86da15d35 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 03c056f05..09c0fea72 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 2de092d69..c115f792a 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 f41fbf40c..5a450ab38 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 aff6fa172..e343d724d 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 d7328c3a2..c77394ebd 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 88f789c53..bcdddc14a 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 332710089..dc427d975 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 b0ae36c2c..e90f98b23 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 c16b6d478..96e1007f1 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 5232995d3..5f5e89cd1 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 2fded51fa..2acd2fb63 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 20ecdd3a9..a1d3d3a4c 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 b3dc44626..3afc191ff 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 9371f6731..228250e1f 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 c3a8dd9c9..2692a56fb 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 2430cc8c5..9581d8c0e 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 87dd30ef6..a32c4915d 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 077b05ab0..20ae36d0d 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 5e7ad8fd8..670c4109b 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 e234c39a0..47107e7f9 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 1c926ebaa..b0f3a57cd 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 942222653..bc6b0d45c 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 47dea53c3..85386a80b 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 518ef3077..52784d5cb 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 82fd98633..ac90f89d1 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 c9443dd54..0af6e189b 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 94d9684c3..07a5c9c69 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 05ca4ec7f..777cdd11d 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 a5d7de6ef..4abaf2d75 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 b28552780..6beee2d7b 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 198982654..a8459ef6a 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 a0f5b8aa5..5b38fccb7 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 3dfda53db..18405bd15 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 ac0dd1788..b689cc663 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 d319e9618..db68e8ca7 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 6037c4feb..af85217db 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 850c8f8b8..a2413e537 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 d350541df..ae9c0b4dd 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 7817b47f7..48eae43a2 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 ec27ad24d..f86485443 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 33a846485..7427e97d7 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 d884ebe9d..dde83d5f5 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 398b10254..0d42477c9 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 fb7141e5a..e3b7148da 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 6e31cd991..b8892d2e8 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 870165333..39826964f 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 c1903f886..a3ec267bc 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 81ba3a598..3740fe377 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 9fbdf074e..a3bdd8c29 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 25dcb5f4c..f5b18cc86 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 70a285490..8fc2b39c9 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 9a3c72d1c..a149d5ceb 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 8f88715d7..bec69e0dc 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 f30c65513..e6945292c 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 bab264b46..d92bebc89 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