Adding live-helper 1.0~a2-1.

This commit is contained in:
Daniel Baumann 2007-09-23 10:04:47 +02:00
parent 3465a2139f
commit f4383da69d
76 changed files with 1539 additions and 5487 deletions

View File

@ -15,9 +15,19 @@ install:
mkdir -p $(DESTDIR)/usr/share/doc/live-helper mkdir -p $(DESTDIR)/usr/share/doc/live-helper
cp -r COPYING doc/* $(DESTDIR)/usr/share/doc/live-helper cp -r COPYING doc/* $(DESTDIR)/usr/share/doc/live-helper
# Installing manpages
mkdir -p $(DESTDIR)/usr/share/man/man1
cp manpages/*.1 $(DESTDIR)/usr/share/man/man1
mkdir -p $(DESTDIR)/usr/share/man/man7
cp manpages/*.7 $(DESTDIR)/usr/share/man/man7
uninstall: uninstall:
# Uninstalling executables # Uninstalling executables
rm -f $(DESTDIR)/usr/bin/lh_* $(DESTDIR)/usr/bin/make-live for HELPER in helpers/*; \
do \
rm -f $(DESTDIR)/usr/bin/`basename $$HELPER`; \
done
# Uninstalling shared data # Uninstalling shared data
rm -rf $(DESTDIR)/usr/share/live-helper rm -rf $(DESTDIR)/usr/share/live-helper
@ -25,6 +35,17 @@ uninstall:
# Uninstalling documentation # Uninstalling documentation
rm -rf $(DESTDIR)/usr/share/doc/live-helper rm -rf $(DESTDIR)/usr/share/doc/live-helper
# Uninstalling manpages
for MANPAGE in manpages/*.1; \
do \
rm -f $(DESTDIR)/usr/share/man/man1/`basename $$MANPAGE`; \
done
for MANPAGE in manpages/*.7; \
do \
rm -f $(DESTDIR)/usr/share/man/man7/`basename $$MANPAGE`; \
done
clean: clean:
reinstall: uninstall install reinstall: uninstall install

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
live-helper (1.0~a2-1) unstable; urgency=low
* New upstream release.
-- Daniel Baumann <daniel@debian.org> Mon, 19 Mar 2007 00:00:00 +0100
live-helper (1.0~a1-3) unstable; urgency=low live-helper (1.0~a1-3) unstable; urgency=low
* helpers/lh_chroot_hacks: Added removal of udev persistent-net rule. * helpers/lh_chroot_hacks: Added removal of udev persistent-net rule.

View File

@ -7,6 +7,7 @@ Patches (alphabetical order):
* Frederic Lehobey <Frederic.Lehobey@free.fr> * Frederic Lehobey <Frederic.Lehobey@free.fr>
* Guerkan Senguen <gurkan@linuks.mine.nu> * Guerkan Senguen <gurkan@linuks.mine.nu>
* Hadar Weiss <whadar@gmail.com> * Hadar Weiss <whadar@gmail.com>
* Inigo Tejedor Arrondo <inigo@navarrux.org>
* Jason D. Clinton <me@jasonclinton.com> * Jason D. Clinton <me@jasonclinton.com>
* Kai Hendry <hendry@iki.fi> * Kai Hendry <hendry@iki.fi>
* Marcelo D. Re <mdre@rectorado.unl.edu.ar> * Marcelo D. Re <mdre@rectorado.unl.edu.ar>

View File

@ -1,16 +1,112 @@
2007-03-14 Daniel Baumann <daniel@debian.org> 2006-03-19 Daniel Baumann <daniel@debian.org>
* helpers/lh_chroot_hacks: Added removal of udev persistent-net rule. * Uploaded 1.0~a2-1.
* Uploaded 1.0~a1-3.
2007-03-14 Daniel Baumann <daniel@debian.org> 2007-03-18 Daniel Baumann <daniel@debian.org>
* functions/defaults.sh: Fixed setting of LIVE_SYSVINIT. * functions/defaults.sh:
* helpers/lh_chroot_sysvinit: Changed check for LIVE_SYSVINIT from disabled to - Quoted date call in LIVE_ISO_VOLUME.
enabled. * manpages/lh_clean.1:
* Uploaded 1.0~a1-2. - Added.
2007-03-12 Daniel Baumann <daniel@debian.org> 2007-03-17 Daniel Baumann <daniel@debian.org>
* Rewritten live-package. * functions/defaults.sh, helpers/*:
* Uploaded 1.0~a1-1. - Renamed LIVE_MIRROR to LIVE_MIRROR_LOCAL and LIVE_MIRROR_SECURITY
to LIVE_MIRROR_LOCAL_SECURITY.
* doc/examples/beryl-hook.sh:
- Added, thanks to Inigo Tejedor Arrondo <inigo@navarrux.org>.
* helpers/lh_config, make-live:
- Added check for newconfig to prevent overwriting of non-specified
options to default values.
* helpers/lh_chroot_localhooks:
- Added basename where needed.
* helpers/lh_chroot_sources:
- Added check for local sources.list in config for custom
repositories.
- Replaced security check for etch with check for not-unstable.
* manpages/lh_binary.1, lh_bootstrap.1, lh_bootstrap_cdebootstrap.1,
lh_bootstrap_debootstrap.1, lh_testroot.1:
- Added.
* templates/syslinux/pxlinux.cfg:
- Fixed path.
2007-03-16 Daniel Baumann <daniel@debian.org>
* helpers/lh_binary_usb: Corrected stagefile creation.
2007-03-15 Daniel Baumann <daniel@debian.org>
* Makefile:
- Replaced helper uninstall routine with a less intrusive one.
* doc/NEWS:
- Updated.
* functions/conffile.sh:
- Beautified.
* functions/defaults.sh:
- Added LH_LOSETUP.
* functions/lockfile.sh:
- Beautified.
* helpers/*:
- Allowing apt-get, not just apt in LH_APT.
* helpers/lh_config:
- Added check for existing configuration.
* helpers/lh_binary_md5sum:
- Removed legacy code.
* helpers/lh_binary_manifest:
- Added creation of packages.txt.
* helpers/lh_binary_usb, lh_source_usb:
- Replaced loop device node workaround with a better one.
* helpers/lh_chroot_hooks, lh_chroot_localhooks:
- Fixed executable check.
* helpers/lh_source_config:
- Added.
* helpers/lh_source_download:
- Separeted debian sources and debian-live configuration into
different directories.
- Added live-helper to the sources.
* helpers/lh_source_generic, lh_source_iso, lh_source_usb,
lh_source_net:
- Removed annyoing warning when sources are disabled.
* helpers/lh_source_net:
- Beautified.
* helpers/make-live:
- Fixed typo in ARGUMENTS.
- Moved help, usage, version into functions.
- Removed build pre-option.
* manpages/live-helper.7:
- Added.
* templates/syslinux/f10.txt:
- Added note about Debian Live project.
2007-03-14 Daniel Baumann <daniel@debian.org>
* functions/defaults.sh, helpers/*:
- Converted LIVE_ROOT to directory, not full path.
* functions/*, helpers/*:
- Replaced LIVE_CHROOT with directory name.
* functions/conffile.sh:
- Added warning if CONFFILE is not readable.
* helpers/lh_chroot_localization:
- Completed check for koffice.
* helpers/lh_source_download:
- Fixed typo in old source removal.
2007-03-14 Daniel Baumann <daniel@debian.org>
* helpers/lh_chroot_hacks:
- Added removal of udev persistent-net rule.
* Uploaded 1.0~a1-3.
2007-03-14 Daniel Baumann <daniel@debian.org>
* functions/defaults.sh:
- Fixed setting of LIVE_SYSVINIT.
* helpers/lh_chroot_sysvinit:
- Changed check for LIVE_SYSVINIT from disabled to enabled.
* Uploaded 1.0~a1-2.
2007-03-12 Daniel Baumann <daniel@debian.org>
* Rewritten live-package.
* Uploaded 1.0~a1-1.

View File

@ -12,7 +12,7 @@ News:
* 2006-06-02: Added support for netboot image generation. * 2006-06-02: Added support for netboot image generation.
http://lists.alioth.debian.org/pipermail/debian-live-devel/2006-May/000185.html http://lists.alioth.debian.org/pipermail/debian-live-devel/2006-May/000185.html
* 2006-07-17: Uploaded live-package to Debian unstable. * 2006-07-17: Uploaded first live-package to Debian unstable.
http://packages.debian.org/changelogs/pool/main/l/live-package/current/changelog#versionversion0.99-1 http://packages.debian.org/changelogs/pool/main/l/live-package/current/changelog#versionversion0.99-1
* 2007-02-05: Setup image autobuild server. * 2007-02-05: Setup image autobuild server.
@ -24,4 +24,4 @@ News:
* 2007-02-17: Added support for encrypted live filesystem. * 2007-02-17: Added support for encrypted live filesystem.
http://lists.alioth.debian.org/pipermail/debian-live-devel/2007-February/000836.html http://lists.alioth.debian.org/pipermail/debian-live-devel/2007-February/000836.html
* 2007-03-12: Uploaded live-helper to Debian unstable. * 2007-03-12: Uploaded first live-helper to Debian unstable.

View File

@ -55,6 +55,7 @@
|_ lh_binary_localincludes |_ lh_binary_localincludes
|_ lh_binary_md5sum |_ lh_binary_md5sum
| |
|_ lh_binary_hdd
|_ lh_binary_iso |_ lh_binary_iso
|_ lh_binary_net |_ lh_binary_net
|_ lh_binary_usb |_ lh_binary_usb
@ -70,8 +71,10 @@
|_ lh_chroot_resolv install |_ lh_chroot_resolv install
|_ lh_chroot_sources install |_ lh_chroot_sources install
| |
|_ lh_source_config
|_ lh_source_download |_ lh_source_download
| |
|_ lh_source_hdd
|_ lh_source_generic |_ lh_source_generic
|_ lh_source_iso |_ lh_source_iso
|_ lh_source_net |_ lh_source_net

View File

@ -11,3 +11,8 @@ Todo:
* write manpage and documentation * write manpage and documentation
* write lh_binary_di and lh_binary_gi * write lh_binary_di and lh_binary_gi
* write lh_binary_grub * write lh_binary_grub
Later:
* Add win32 autorun like
http://morphix.svn.sourceforge.net/viewvc/morphix/trunk/cdrom-misc/autorun/
* Add loadlin batch

60
doc/examples/beryl-hook.sh Executable file
View File

@ -0,0 +1,60 @@
#!/bin/sh
# This is a hook for live-helper(7) to install beryl and enable aixgl.
# It was originally written by Inigo Tejedor Arrondo <inigo@navarrux.org>.
# To enable it, copy this hook into your config/chroot_localhooks directory.
#
# At boot prompt, type 'linux aixgl', press enter and have fun.
# Update sources.list
cat >> /etc/apt/sources.list << EOF
# beryl-project
deb http://debian.beryl-project.org/ etch main
EOF
if grep deb-src /etc/apt/sources.list
then
echo "deb-src http://debian.beryl-project.org/ etch main" >> /etc/apt/sources.list
fi
# Import archive signing key
wget -O - http://debian.beryl-project.org/root@lupine.me.uk.gpg | apt-key add -
# Update indices
apt-get update
# Install packages
PACKAGES="beryl beryl-core beryl-manager beryl-plugins beryl-plugins-unsupported beryl-settings beryl-settings-bindings beryl-settings-simple"
if [ -f /usr/bin/gnome-session ]
then
PACKAGES="${PACKAGES} emerald emerald-themes heliodor"
fi
if [ -f /usr/bin/kstart ]
then
PACKAGES="${PACKAGES} aquamarine"
fi
apt-get install --yes ${PACKAGES}
# Add init script
cat > /etc/init.d/aixgl << EOF
#!/bin/sh
if cat /proc/cmdline | grep aixgl > /dev/null
then
echo "Configuring xorg for aixgl..."
echo "" >> /etc/X11/xorg.conf
echo "# Added by beryl-hook.sh" >> /etc/X11/xorg.conf
echo "Section \"Extensions\"" >> /etc/X11/xorg.conf
echo " Option \"Composite\" \"Enable\"" >> /etc/X11/xorg.conf
echo "EndSection" >> /etc/X11/xorg.conf
sed -i -e "s/Section \"Device\""/"Section \"Device\"\n\t Option \"XAANoOffscreenPixmaps\" \"true\"\n\t Option \"AddARGBGLXVisuals\" \"on\"\n\t Option \"AllowGLXWithComposite\" \"true\"/" -e "s/Section \"Module\""/"Section \"Module\"\n\t Load \"i2c\"\n\t Load \"int10\"\n\t Load \"xtrap\"\n\t Load \"vbe\"/" /etc/X11/xorg.conf
fi
EOF
chmod 0755 /etc/init.d/aixgl
update-rc.d aixgl defaults

View File

@ -9,5 +9,5 @@ Chroot ()
COMMANDS="${1}" COMMANDS="${1}"
# Executing commands in chroot # Executing commands in chroot
chroot "${LIVE_CHROOT}" /usr/bin/env -i HOME="/root" PATH="/usr/sbin:/usr/bin:/sbin:/bin" TERM="${TERM}" ftp_proxy="${LH_APT_FTPPROXY}" http_proxy="${LH_APT_HTTPPPROXY}" DEBIAN_FRONTEND="${LH_DEBCONF_FRONTEND}" DEBIAN_PRIORITY="${LH_DEBCONF_PRIORITY}" ${COMMANDS} chroot chroot /usr/bin/env -i HOME="/root" PATH="/usr/sbin:/usr/bin:/sbin:/bin" TERM="${TERM}" ftp_proxy="${LH_APT_FTPPROXY}" http_proxy="${LH_APT_HTTPPPROXY}" DEBIAN_FRONTEND="${LH_DEBCONF_FRONTEND}" DEBIAN_PRIORITY="${LH_DEBCONF_PRIORITY}" ${COMMANDS}
} }

View File

@ -9,8 +9,13 @@ Read_conffile ()
CONFFILE="${1}" CONFFILE="${1}"
# Reading configuration file # Reading configuration file
if [ -r "${CONFFILE}" ] if [ -f "${CONFFILE}" ]
then then
. "${CONFFILE}" if [ -r "${CONFFILE}" ]
then
. "${CONFFILE}"
else
echo "W: failed to read ${CONFFILE}"
fi
fi fi
} }

View File

@ -55,7 +55,7 @@ Set_defaults ()
fi fi
# Setting bootstrap program # Setting bootstrap program
if [ -z "${LH_BOOTSTRAP}" ] if [ -z "${LH_BOOTSTRAP}" ] || [ ! -x "${LH_BOOTSTRAP}" ]
then then
if [ -x "/usr/bin/cdebootstrap" ] if [ -x "/usr/bin/cdebootstrap" ]
then then
@ -87,32 +87,44 @@ Set_defaults ()
fi fi
# Setting genisoimage # Setting genisoimage
if [ -x /usr/bin/genisoimage ] if [ -z "${LH_GENISOIMAGE}" ] || [ ! -x "${LH_GENISOIMAGE}" ]
then then
LH_GENISOIMAGE="genisoimage" if [ -x /usr/bin/genisoimage ]
elif [ -x /usr/bin/mkisofs ] then
LH_GENISOIMAGE="genisoimage"
elif [ -x /usr/bin/mkisofs ]
then
LH_GENISOIMAGE="mkisofs"
else
echo "E: cannot find genisoimage nor mkisofs (FIXME)."
exit 1
fi
fi
# Setting losetup
if [ -z "${LH_LOSETUP}" ] || [ ! -x "${LH_LOSETUP}" ]
then then
LH_GENISOIMAGE="mkisofs" # Check for loop-aes-utils divertion
else if [ -x /sbin/losetup.orig ]
echo "E: cannot find genisoimage nor mkisofs (FIXME)." then
exit 1 LH_LOSETUP="losetup.orig"
elif [ -x /sbin/losetup ]
then
LH_LOSETUP="losetup"
else
echo "E: Can't process file /sbin/losetup (FIXME)"
fi
fi fi
# Setting root directory # Setting root directory
if [ -z "${LIVE_ROOT}" ] if [ -z "${LIVE_ROOT}" ]
then then
LIVE_ROOT="`pwd`/debian-live" LIVE_ROOT="debian-live"
fi
# Setting chroot directory
if [ -z "${LIVE_CHROOT}" ]
then
LIVE_CHROOT="${LIVE_ROOT}/chroot"
fi fi
## config/bootstrap ## config/bootstrap
# Setting architecture string # Setting architecture value
if [ -z "${LIVE_ARCHITECTURE}" ] if [ -z "${LIVE_ARCHITECTURE}" ]
then then
if [ -x "/usr/bin/dpkg" ] if [ -x "/usr/bin/dpkg" ]
@ -123,46 +135,46 @@ Set_defaults ()
fi fi
fi fi
# Setting distribution string # Setting distribution value
if [ -z "${LIVE_DISTRIBUTION}" ] if [ -z "${LIVE_DISTRIBUTION}" ]
then then
LIVE_DISTRIBUTION="sid" LIVE_DISTRIBUTION="sid"
fi fi
# Setting distribution configuration string # Setting distribution configuration value
# LIVE_DISTRIBUTION_CONFIG # LIVE_DISTRIBUTION_CONFIG
# Setting flavour string # Setting flavour value
if [ -z "${LIVE_FLAVOUR}" ] if [ -z "${LIVE_FLAVOUR}" ]
then then
LIVE_FLAVOUR="standard" LIVE_FLAVOUR="standard"
fi fi
# Setting mirror string # Setting local mirror value
if [ -z "${LIVE_MIRROR}" ] if [ -z "${LIVE_MIRROR_LOCAL}" ]
then then
LIVE_MIRROR="http://ftp.debian.org/debian/" LIVE_MIRROR_LOCAL="http://ftp.debian.org/debian/"
fi fi
# Setting security mirror string # Setting local security mirror value
if [ -z "${LIVE_MIRROR_SECURITY}" ] if [ -z "${LIVE_MIRROR_LOCAL_SECURITY}" ]
then then
LIVE_MIRROR_SECURITY="http://security.debian.org/" LIVE_MIRROR_LOCAL_SECURITY="http://security.debian.org/"
fi fi
# Setting mirror string # Setting generic mirror value
if [ -z "${LIVE_MIRROR_GENERIC}" ] if [ -z "${LIVE_MIRROR_GENERIC}" ]
then then
LIVE_MIRROR_GENERIC="http://ftp.debian.org/debian/" LIVE_MIRROR_GENERIC="http://ftp.debian.org/debian/"
fi fi
# Setting security mirror string # Setting generic security mirror value
if [ -z "${LIVE_MIRROR_GENERIC_SECURITY}" ] if [ -z "${LIVE_MIRROR_GENERIC_SECURITY}" ]
then then
LIVE_MIRROR_GENERIC_SECURITY="http://security.debian.org/" LIVE_MIRROR_GENERIC_SECURITY="http://security.debian.org/"
fi fi
# Setting sections string # Setting sections value
if [ -z "${LIVE_SECTIONS}" ] if [ -z "${LIVE_SECTIONS}" ]
then then
LIVE_SECTIONS="main" LIVE_SECTIONS="main"
@ -349,7 +361,7 @@ Set_defaults ()
# Setting iso volume # Setting iso volume
if [ -z "${LIVE_ISO_VOLUME}" ] if [ -z "${LIVE_ISO_VOLUME}" ]
then then
LIVE_ISO_VOLUME='Debian Live ${DATE}' LIVE_ISO_VOLUME="Debian Live \`date +%Y%m%d\`"
fi fi
# Setting netboot server address # Setting netboot server address

18
functions/help.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/sh
# help.sh - handle help information
Help ()
{
echo "${PROGRAM} - ${DESCRIPTION}"
echo
echo "${USAGE}"
echo "Usage: ${PROGRAM} [-h|--help]"
echo "Usage: ${PROGRAM} [-u|--usage]"
echo "Usage: ${PROGRAM} [-v|--version]"
echo
echo "${HELP}"
echo
echo "Report bugs to Debian Live project <http://debian-live.alioth.debian.org/>."
exit 0
}

View File

@ -27,9 +27,9 @@ Create_lockfile ()
mkdir -p "${LOCKDIRECTORY}" mkdir -p "${LOCKDIRECTORY}"
fi fi
# Creating lock file # Creating lock trap
trap "test -f ${LOCKFILE} && \ trap "test -f ${LOCKFILE} && rm -f ${LOCKFILE}; exit 0" 0 2 15
rm -f ${LOCKFILE}; exit 0" 0 2 15
# Creating lock file
touch "${LOCKFILE}" touch "${LOCKFILE}"
} }

16
functions/usage.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
# usage.sh - handle usage information
Usage ()
{
echo "${PROGRAM} - ${DESCRIPTION}"
echo
echo "${USAGE}"
echo "Usage: ${PROGRAM} [-h|--help]"
echo "Usage: ${PROGRAM} [-u|--usage]"
echo "Usage: ${PROGRAM} [-v|--version]"
echo
echo "Try \"${PROGRAM} --help\" for more information."
exit 1
}

View File

@ -2,5 +2,33 @@
# version.sh - handle version information # version.sh - handle version information
DATE="`date +%Y%m%d`" VERSION="1.0~a2"
VERSION="1.0~a1"
Version ()
{
echo "${PROGRAM}, version ${VERSION}"
echo "This program is a part of live-helper."
echo
echo "Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org>"
echo "Copyright (C) 2006-2007 Marco Amadori <marco.amadori@gmail.com>"
echo
echo "This program is free software; you can redistribute it and/or modify"
echo "it under the terms of the GNU General Public License as published by"
echo "the Free Software Foundation; either version 2 of the License, or"
echo "(at your option) any later version."
echo
echo "This program is distributed in the hope that it will be useful,"
echo "but WITHOUT ANY WARRANTY; without even the implied warranty of"
echo "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the"
echo "GNU General Public License for more details."
echo
echo "You should have received a copy of the GNU General Public License"
echo "along with this program; if not, write to the Free Software"
echo "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA"
echo
echo "On Debian systems, the complete text of the GNU General Public License"
echo "can be found in /usr/share/common-licenses/GPL file."
echo
echo "Homepage: <http://debian-live.alioth.debian.org/>"
exit 0
}

View File

@ -2,17 +2,6 @@
# lh_image(1) - building the images # lh_image(1) - building the images
# Source common functions
for FUNCTION in /usr/share/live-helper/functions/*.sh
do
. ${FUNCTION}
done
# Reading configuration files
Read_conffile config/common
Read_conffile config/image
Set_defaults
# Building root filesystem # Building root filesystem
lh_binary_rootfs lh_binary_rootfs
lh_binary_manifest lh_binary_manifest
@ -34,6 +23,7 @@ lh_binary_localincludes
lh_binary_md5sum lh_binary_md5sum
# Building images # Building images
lh_binary_hdd
lh_binary_iso lh_binary_iso
lh_binary_net lh_binary_net
lh_binary_usb lh_binary_usb

View File

@ -16,17 +16,17 @@ Read_conffile config/image
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
Require_stagefile "${LIVE_ROOT}"/.stage/binary_rootfs Require_stagefile .stage/binary_rootfs
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/binary_encryption Check_stagefile .stage/binary_encryption
if [ -n "${LIVE_ENCRYPTION}" ] if [ -n "${LIVE_ENCRYPTION}" ]
then then
@ -51,11 +51,11 @@ then
;; ;;
esac esac
echo "Encrypting ${LIVE_ROOT}/binary/casper/filesystem.${ROOTFS} with ${LIVE_ENCRYPTION}..." echo "Encrypting binary/casper/filesystem.${ROOTFS} with ${LIVE_ENCRYPTION}..."
while true while true
do do
cat ${LIVE_ROOT}/binary/casper/filesystem.${ROOTFS} | aespipe -e "${LIVE_ENCRYPTION}" -T > "${LIVE_ROOT}"/binary/casper/filesystem.${ROOTFS} && break cat binary/casper/filesystem.${ROOTFS} | aespipe -e "${LIVE_ENCRYPTION}" -T > binary/casper/filesystem.${ROOTFS} && break
echo -n "Something went wrong... Retry? [YES/no] " echo -n "Something went wrong... Retry? [YES/no] "
@ -69,5 +69,5 @@ then
done done
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/binary_encryption Create_stagefile .stage/binary_encryption
fi fi

46
helpers/lh_binary_hdd Executable file
View File

@ -0,0 +1,46 @@
#!/bin/sh
# lh_binary_hdd(1) - build harddisk binary image
set -e
# Source common functions
for FUNCTION in /usr/share/live-helper/functions/*.sh
do
. ${FUNCTION}
done
# Reading configuration files
Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/image
Set_defaults
# Requiring stage file
Require_stagefile .stage/bootstrap
# Checking lock file
Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
# Checking stage file
Check_stagefile .stage/binary_hdd
for IMAGE in ${LIVE_BINARY_IMAGE}
do
if [ "${IMAGE}" = "hdd" ]
then
# Remove old binary
if [ -f binary-hdd.tar.gz ]
then
rm -f binary-hdd.tar.gz
fi
tar cfz binary-hdd.tar.gz binary
# Creating stage file
Create_stagefile .stage/binary_hdd
fi
done

View File

@ -17,26 +17,26 @@ Read_conffile config/image
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/binary_includes Check_stagefile .stage/binary_includes
if ls /usr/share/live-helper/includes/common/* &> /dev/null if ls /usr/share/live-helper/includes/common/* &> /dev/null
then then
cp -r /usr/share/live-helper/includes/common/* "${LIVE_ROOT}"/binary cp -r /usr/share/live-helper/includes/common/* binary
fi fi
if ls /usr/share/live-helper/includes/"${LIVE_BINARY_IMAGE}"/* &> /dev/null if ls /usr/share/live-helper/includes/"${LIVE_BINARY_IMAGE}"/* &> /dev/null
then then
cp -r /usr/share/live-helper/includes/"${LIVE_BINARY_IMAGE}"/* "${LIVE_ROOT}"/binary cp -r /usr/share/live-helper/includes/"${LIVE_BINARY_IMAGE}"/* binary
fi fi
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/binary_includes Create_stagefile .stage/binary_includes

View File

@ -17,38 +17,38 @@ Read_conffile config/image
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/binary_iso Check_stagefile .stage/binary_iso
for IMAGE in ${LIVE_BINARY_IMAGE} for IMAGE in ${LIVE_BINARY_IMAGE}
do do
if [ "${IMAGE}" = "iso" ] if [ "${IMAGE}" = "iso" ]
then then
# Remove old binary # Remove old binary
if [ -f "${LIVE_ROOT}"/binary.iso ] if [ -f binary.iso ]
then then
rm -f "${LIVE_ROOT}"/binary.iso rm -f binary.iso
fi fi
# Create image # Create image
if [ "${LIVE_ARCHITECTURE}" = "amd64" ] || [ "${LIVE_ARCHITECTURE}" = "i386" ] if [ "${LIVE_ARCHITECTURE}" = "amd64" ] || [ "${LIVE_ARCHITECTURE}" = "i386" ]
then then
${LH_GENISOIMAGE} -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o "${LIVE_ROOT}"/"${LIVE_IMAGE}"binary.iso -r -J -l -V "${LIVE_ISO_VOLUME}" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table "${LIVE_ROOT}"/binary ${LIVE_INCLUDE_IMAGE} ${LH_GENISOIMAGE} -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o "${LIVE_IMAGE}"binary.iso -r -J -l -V "${LIVE_ISO_VOLUME}" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table binary ${LIVE_INCLUDE_IMAGE}
else else
echo "W: Bootloader on your architecture not yet supported (Continuing in 5 seconds)." echo "W: Bootloader on your architecture not yet supported (Continuing in 5 seconds)."
sleep 5 sleep 5
${LH_GENISOIMAGE} -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o "${LIVE_ROOT}"/"${LIVE_IMAGE}"binary.iso -r -J -l -V "${LIVE_ISO_VOLUME}" "${LIVE_ROOT}"/binary ${LIVE_INCLUDE_IMAGE} ${LH_GENISOIMAGE} -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o "${LIVE_IMAGE}"binary.iso -r -J -l -V "${LIVE_ISO_VOLUME}" binary ${LIVE_INCLUDE_IMAGE}
fi fi
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/binary_iso Create_stagefile .stage/binary_iso
fi fi
done done

View File

@ -16,32 +16,32 @@ Read_conffile config/image
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/binary_linuximage Check_stagefile .stage/binary_linuximage
# Removing initrd backup files # Removing initrd backup files
rm -f "${LIVE_CHROOT}"/boot/initrd*bak* rm -f chroot/boot/initrd*bak*
# Setting destination directory # Setting destination directory
case "${LIVE_BINARY_IMAGE}" in case "${LIVE_BINARY_IMAGE}" in
iso) iso)
DESTDIR="${LIVE_ROOT}/binary/isolinux" DESTDIR="binary/isolinux"
;; ;;
net) net)
DESTDIR="${LIVE_ROOT}/tftpboot" DESTDIR="tftpboot"
;; ;;
usb) usb|hdd)
DESTDIR="${LIVE_ROOT}/binary" DESTDIR="binary"
;; ;;
esac esac
@ -52,8 +52,8 @@ then
fi fi
# Installing linux-image # Installing linux-image
cp "${LIVE_CHROOT}"/boot/vmlinuz* "${DESTDIR}"/vmlinuz cp chroot/boot/vmlinuz* "${DESTDIR}"/vmlinuz
cp "${LIVE_CHROOT}"/boot/initrd.img* "${DESTDIR}"/initrd.gz cp chroot/boot/initrd.img* "${DESTDIR}"/initrd.gz
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/binary_linuximage Create_stagefile .stage/binary_linuximage

View File

@ -16,24 +16,24 @@ Read_conffile config/chroot
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/binary_localincludes Check_stagefile .stage/binary_localincludes
if ls "${LIVE_ROOT}"/config/binary_localincludes/* &> /dev/null if ls config/binary_localincludes/* &> /dev/null
then then
cd "${LIVE_ROOT}"/config/binary_localincludes
# Copying includes # Copying includes
find . | cpio -dmpu "${LIVE_ROOT}"/binary cd config/binary_localincludes
find . | cpio -dmpu ../../binary
cd "${OLDPWD}"
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/binary_localincludes Create_stagefile .stage/binary_localincludes
fi fi

View File

@ -16,19 +16,22 @@ Read_conffile config/image
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/binary_manifest Check_stagefile .stage/binary_manifest
# Add filesystem.manifest # Add filesystem.manifest
Chroot "dpkg --get-selections" | awk '{ print $1 }' | sort -u > "${LIVE_ROOT}"/binary/casper/filesystem.manifest Chroot "dpkg --get-selections" | awk '{ print $1 }' | sort -u > binary/casper/filesystem.manifest
# Add packages.list
Chroot "dpkg -l" > packages.txt
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/binary_manifest Create_stagefile .stage/binary_manifest

View File

@ -16,36 +16,27 @@ Read_conffile config/image
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/binary_md5sum Check_stagefile .stage/binary_md5sum
# Remove old md5sums # Remove old md5sums
if [ -f "${LIVE_ROOT}"/binary/md5sum.txt ] if [ -f binary/md5sum.txt ]
then then
rm -f "${LIVE_ROOT}"/binary/md5sum.txt rm -f binary/md5sum.txt
fi fi
# Calculating md5sums # Calculating md5sums
cd "${LIVE_ROOT}"/binary cd binary
find . -type f -print0 | xargs -0 md5sum > "${LIVE_ROOT}"/md5sum.txt find . -type f -print0 | xargs -0 md5sum > md5sum.txt
cd "${OLDPWD}" cd "${OLDPWD}"
if [ -d "${LIVE_INCLUDE_IMAGE}" ]
then
cd "${LIVE_INCLUDE_IMAGE}"
find . -type f -print0 | xargs -0 md5sum >> "${LIVE_ROOT}"/md5sum.txt
cd "${OLDPWD}"
fi
mv "${LIVE_ROOT}"/md5sum.txt "${LIVE_ROOT}"/binary
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/binary_md5sum Create_stagefile .stage/binary_md5sum

View File

@ -17,16 +17,16 @@ Read_conffile config/image
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/binary_memtest86 Check_stagefile .stage/binary_memtest86
if [ "${LIVE_ARCHITECTURE}" != "amd64" ] && [ "${LIVE_ARCHITECTURE}" != "i386" ] if [ "${LIVE_ARCHITECTURE}" != "amd64" ] && [ "${LIVE_ARCHITECTURE}" != "i386" ]
then then
@ -36,7 +36,7 @@ fi
if [ "${LIVE_MEMTEST86}" = "enabled" ] if [ "${LIVE_MEMTEST86}" = "enabled" ]
then then
if [ ! -f "${LIVE_CHROOT}"/boot/memtest86+.bin ] if [ ! -f chroot/boot/memtest86+.bin ]
then then
PACKAGES="${PACKAGES} memtest86+" PACKAGES="${PACKAGES} memtest86+"
fi fi
@ -45,7 +45,7 @@ then
then then
# Installing symlinks # Installing symlinks
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
Chroot "apt-get install --yes ${PACKAGES}" Chroot "apt-get install --yes ${PACKAGES}"
;; ;;
@ -57,15 +57,15 @@ then
case "${LIVE_BINARY_IMAGE}" in case "${LIVE_BINARY_IMAGE}" in
iso) iso)
DESTDIR="${LIVE_ROOT}/binary/isolinux" DESTDIR="binary/isolinux"
;; ;;
net) net)
DESTDIR="${LIVE_ROOT}/tftpboot" DESTDIR="tftpboot"
;; ;;
usb) usb|hdd)
DESTDIR="${LIVE_ROOT}/binary" DESTDIR="binary"
;; ;;
esac esac
@ -76,13 +76,13 @@ then
fi fi
# Installing memtest86+ # Installing memtest86+
cp "${LIVE_ROOT}"/chroot/boot/memtest86+.bin "${DESTDIR}"/memtest cp chroot/boot/memtest86+.bin "${DESTDIR}"/memtest
if [ -n "${PACKAGES}" ] if [ -n "${PACKAGES}" ]
then then
# Removing syslinux # Removing syslinux
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
Chroot "apt-get remove --purge --yes ${PACKAGES}" Chroot "apt-get remove --purge --yes ${PACKAGES}"
;; ;;
@ -93,5 +93,5 @@ then
fi fi
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/binary_memtest86 Create_stagefile .stage/binary_memtest86
fi fi

View File

@ -17,37 +17,38 @@ Read_conffile config/image
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/binary_net Check_stagefile .stage/binary_net
for IMAGE in ${LIVE_BINARY_IMAGE} for IMAGE in ${LIVE_BINARY_IMAGE}
do do
if [ "${IMAGE}" = "net" ] if [ "${IMAGE}" = "net" ]
then then
# Remove old binary # Remove old binary
if [ -f "${LIVE_ROOT}"/binary.tar.gz ] if [ -f binary-net.tar.gz ]
then then
rm -f "${LIVE_ROOT}"/binary.tar.gz rm -f binary-net.tar.gz
fi fi
# Creating image file # Creating image file
cd "${LIVE_ROOT}" && \ mv binary "`basename ${LIVE_SERVER_PATH}`"
mv binary "`basename ${LIVE_SERVER_PATH}`" && \
cd .. && \ cd ..
tar cfz binary.tar.gz "`basename ${LIVE_ROOT}`/`basename ${LIVE_SERVER_PATH}`" "`basename ${LIVE_ROOT}`/tftpboot" && \ tar cfz binary-net.tar.gz "${LIVE_ROOT}/`basename ${LIVE_SERVER_PATH}`" "${LIVE_ROOT}/tftpboot"
mv binary.tar.gz "${LIVE_ROOT}" && \ mv binary-net.tar.gz "${LIVE_ROOT}"
cd "${OLDPWD}" && \ cd "${OLDPWD}"
mv "`basename ${LIVE_SERVER_PATH}`" binary mv "`basename ${LIVE_SERVER_PATH}`" binary
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/binary_net Create_stagefile .stage/binary_net
fi fi
done done

View File

@ -16,61 +16,61 @@ Read_conffile config/image
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/binary_rootfs Check_stagefile .stage/binary_rootfs
# Creating directory # Creating directory
if [ ! -d "${LIVE_ROOT}"/binary/casper ] if [ ! -d binary/casper ]
then then
mkdir -p "${LIVE_ROOT}"/binary/casper mkdir -p binary/casper
fi fi
case "${LIVE_FILESYSTEM}" in case "${LIVE_FILESYSTEM}" in
ext2) ext2)
if [ -f "${LIVE_ROOT}"/binary/casper/filesystem.ext2 ] if [ -f binary/casper/filesystem.ext2 ]
then then
rm -f "${LIVE_ROOT}"/binary/casper/filesystem.ext2 rm -f binary/casper/filesystem.ext2
fi fi
DU_DIM="`du -ks ${LIVE_CHROOT} | cut -f1`" DU_DIM="`du -ks chroot | cut -f1`"
REAL_DIM="`expr ${DU_DIM} + ${DU_DIM} / 20`" # Just 5% more to be sure, need something more sophistcated here... REAL_DIM="`expr ${DU_DIM} + ${DU_DIM} / 20`" # Just 5% more to be sure, need something more sophistcated here...
genext2fs --size-in-blocks=${REAL_DIM} --reserved-blocks=0 --root="${LIVE_CHROOT}" "${LIVE_ROOT}"/binary/casper/filesystem.ext2 genext2fs --size-in-blocks=${REAL_DIM} --reserved-blocks=0 --root=chroot binary/casper/filesystem.ext2
;; ;;
plain) plain)
if [ -d "${LIVE_ROOT}"/binary/casper/filesystem.dir ] if [ -d binary/casper/filesystem.dir ]
then then
rm -rf "${LIVE_ROOT}"/binary/casper/filesystem.dir rm -rf binary/casper/filesystem.dir
fi fi
cd "${LIVE_CHROOT}" cd chroot
find . | cpio -pumd "${LIVE_ROOT}"/binary/casper/filesystem.dir find . | cpio -pumd ../binary/casper/filesystem.dir
cd "${OLDPWD}" cd "${OLDPWD}"
;; ;;
squashfs) squashfs)
if [ -f "${LIVE_ROOT}"/binary/casper/filesystem.squashfs ] if [ -f binary/casper/filesystem.squashfs ]
then then
rm "${LIVE_ROOT}"/binary/casper/filesystem.squashfs rm binary/casper/filesystem.squashfs
fi fi
if [ "${LIVE_FLAVOUR}" = "minimal" ] || [ "${LIVE_FLAVOUR}" = "mini" ] if [ "${LIVE_FLAVOUR}" = "minimal" ] || [ "${LIVE_FLAVOUR}" = "mini" ]
then then
mksquashfs "${LIVE_CHROOT}" "${LIVE_ROOT}"/binary/casper/filesystem.squashfs -e "${LIVE_CHROOT}"/boot/vmlinuz* "${LIVE_CHROOT}"/boot/initrd.img* "${LIVE_CHROOT}"/vmlinuz "${LIVE_CHROOT}"/initrd.img "${LIVE_CHROOT}"/boot/config-* "${LIVE_CHROOT}"/boot/System.map-* mksquashfs chroot binary/casper/filesystem.squashfs -e chroot/boot/vmlinuz* chroot/boot/initrd.img* chroot/vmlinuz chroot/initrd.img chroot/boot/config-* chroot/boot/System.map-*
else else
mksquashfs "${LIVE_CHROOT}" "${LIVE_ROOT}"/binary/casper/filesystem.squashfs mksquashfs chroot binary/casper/filesystem.squashfs
fi fi
;; ;;
esac esac
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/binary_rootfs Create_stagefile .stage/binary_rootfs

View File

@ -17,16 +17,16 @@ Read_conffile config/image
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/binary_syslinux Check_stagefile .stage/binary_syslinux
if [ "${LIVE_ARCHITECTURE}" != "amd64" ] && [ "${LIVE_ARCHITECTURE}" != "i386" ] if [ "${LIVE_ARCHITECTURE}" != "amd64" ] && [ "${LIVE_ARCHITECTURE}" != "i386" ]
then then
@ -36,7 +36,7 @@ fi
if [ "${LIVE_SYSLINUX}" = "enabled" ] if [ "${LIVE_SYSLINUX}" = "enabled" ]
then then
if [ ! -f "${LIVE_CHROOT}"/usr/bin/syslinux ] if [ ! -f chroot/usr/bin/syslinux ]
then then
PACKAGES="${PACKAGES} syslinux" PACKAGES="${PACKAGES} syslinux"
fi fi
@ -45,7 +45,7 @@ then
then then
# Installing symlinks # Installing symlinks
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
Chroot "apt-get install --yes ${PACKAGES}" Chroot "apt-get install --yes ${PACKAGES}"
;; ;;
@ -63,73 +63,73 @@ then
case "${LIVE_BINARY_IMAGE}" in case "${LIVE_BINARY_IMAGE}" in
iso) iso)
# Copying syslinux # Copying syslinux
mkdir -p "${LIVE_ROOT}"/binary/isolinux mkdir -p binary/isolinux
cp "${LIVE_CHROOT}"/usr/lib/syslinux/isolinux.bin "${LIVE_ROOT}"/binary/isolinux cp chroot/usr/lib/syslinux/isolinux.bin binary/isolinux
cp -r "${LIVE_TEMPLATES}"/syslinux/* "${LIVE_ROOT}"/binary/isolinux cp -r "${LIVE_TEMPLATES}"/syslinux/* binary/isolinux
# Copying splash screen # Copying splash screen
if [ -n "${LIVE_SYSLINUX_SPLASH}" ] if [ -n "${LIVE_SYSLINUX_SPLASH}" ]
then then
cp "${LIVE_SYSLINUX_SPLASH}" "${LIVE_ROOT}/binary/isolinux/splash.rle" cp "${LIVE_SYSLINUX_SPLASH}" binary/isolinux/splash.rle
fi fi
# Configure syslinux templates # Configure syslinux templates
sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" "${LIVE_ROOT}"/binary/isolinux/isolinux.cfg sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" binary/isolinux/isolinux.cfg
sed -i -e "s/LIVE_DATE/${DATE}/" "${LIVE_ROOT}"/binary/isolinux/f1.txt sed -i -e "s/LIVE_DATE/`date +%Y%m%d`/" binary/isolinux/f1.txt
sed -i -e "s/LIVE_VERSION/${VERSION}/" "${LIVE_ROOT}"/binary/isolinux/f10.txt sed -i -e "s/LIVE_VERSION/${VERSION}/" binary/isolinux/f10.txt
# Remove unused files # Remove unused files
rm -f "${LIVE_ROOT}"/binary/isolinux/pxelinux.cfg rm -f binary/isolinux/pxelinux.cfg
;; ;;
net) net)
# Copying syslinux # Copying syslinux
mkdir -p "${LIVE_ROOT}"/tftpboot mkdir -p tftpboot
cp "${LIVE_CHROOT}"/usr/lib/syslinux/pxelinux.0 "${LIVE_ROOT}"/tftpboot cp chroot/usr/lib/syslinux/pxelinux.0 tftpboot
# Install syslinux templates # Install syslinux templates
mkdir -p "${LIVE_ROOT}"/tftpboot/pxelinux.cfg mkdir -p tftpboot/pxelinux.cfg
cp -r "${LIVE_TEMPLATES}"/syslinux/* "${LIVE_ROOT}"/tftpboot/pxelinux.cfg cp -r "${LIVE_TEMPLATES}"/syslinux/* tftpboot/pxelinux.cfg
mv "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/pxelinux.cfg "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/default mv tftpboot/pxelinux.cfg/pxelinux.cfg tftpboot/pxelinux.cfg/default
sed -i -e 's#splash.rle#pxelinux.cfg/splash.rle#' "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/isolinux.txt sed -i -e 's#splash.rle#pxelinux.cfg/splash.rle#' tftpboot/pxelinux.cfg/isolinux.txt
# Copying splash screen # Copying splash screen
if [ -n "${LIVE_SYSLINUX_SPLASH}" ] if [ -n "${LIVE_SYSLINUX_SPLASH}" ]
then then
cp "${LIVE_SYSLINUX_SPLASH}" "${LIVE_ROOT}/tftpboot/pxelinux.cfg/splash.rle" cp "${LIVE_SYSLINUX_SPLASH}" ftpboot/pxelinux.cfg/splash.rle
fi fi
# Configure syslinux templates # Configure syslinux templates
sed -i -e "s/LIVE_SERVER_ADDRESS/${LIVE_SERVER_ADDRESS}/" -e "s#LIVE_SERVER_PATH#${LIVE_SERVER_PATH}#" -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/default sed -i -e "s/LIVE_SERVER_ADDRESS/${LIVE_SERVER_ADDRESS}/" -e "s#LIVE_SERVER_PATH#${LIVE_SERVER_PATH}#" -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" tftpboot/pxelinux.cfg/default
sed -i -e "s/LIVE_DATE/${DATE}/" "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/f1.txt sed -i -e "s/LIVE_DATE/`date +%Y%m%d`/" tftpboot/pxelinux.cfg/f1.txt
sed -i -e "s/LIVE_VERSION/${VERSION}/" "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/f10.txt sed -i -e "s/LIVE_VERSION/${VERSION}/" tftpboot/pxelinux.cfg/f10.txt
# Remove unused files # Remove unused files
rm -f "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/isolinux.cfg rm -f tftpboot/pxelinux.cfg/isolinux.cfg
;; ;;
usb) usb|hdd)
# Copying syslinux # Copying syslinux
mkdir -p "${LIVE_ROOT}"/binary mkdir -p binary
cp "${LIVE_CHROOT}"/usr/lib/syslinux/isolinux.bin "${LIVE_ROOT}"/binary/syslinux.bin cp chroot/usr/lib/syslinux/isolinux.bin binary/syslinux.bin
cp -r "${LIVE_TEMPLATES}"/syslinux/* "${LIVE_ROOT}"/binary cp -r "${LIVE_TEMPLATES}"/syslinux/* binary
mv "${LIVE_ROOT}"/binary/isolinux.cfg "${LIVE_ROOT}"/binary/syslinux.cfg mv binary/isolinux.cfg binary/syslinux.cfg
mv "${LIVE_ROOT}"/binary/isolinux.txt "${LIVE_ROOT}"/binary/syslinux.txt mv binary/isolinux.txt binary/syslinux.txt
sed -i -e "s/isolinux.txt/syslinux.txt/" "${LIVE_ROOT}"/binary/syslinux.cfg sed -i -e "s/isolinux.txt/syslinux.txt/" binary/syslinux.cfg
# Copying splash screen # Copying splash screen
if [ -n "${LIVE_SYSLINUX_SPLASH}" ] if [ -n "${LIVE_SYSLINUX_SPLASH}" ]
then then
cp "${LIVE_SYSLINUX_SPLASH}" "${LIVE_ROOT}/binary/splash.rle" cp "${LIVE_SYSLINUX_SPLASH}" binary/splash.rle
fi fi
# Configure syslinux templates # Configure syslinux templates
sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" "${LIVE_ROOT}"/binary/syslinux.cfg sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" binary/syslinux.cfg
sed -i -e "s/LIVE_DATE/${DATE}/" "${LIVE_ROOT}"/binary/f1.txt sed -i -e "s/LIVE_DATE/`date +%Y%m%d`/" binary/f1.txt
sed -i -e "s/LIVE_VERSION/${VERSION}/" "${LIVE_ROOT}"/binary/f10.txt sed -i -e "s/LIVE_VERSION/${VERSION}/" binary/f10.txt
# Remove unused files # Remove unused files
rm -f "${LIVE_ROOT}"/binary/pxelinux.cfg rm -f binary/pxelinux.cfg
;; ;;
esac esac
@ -137,7 +137,7 @@ then
then then
# Removing syslinux # Removing syslinux
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
Chroot "apt-get remove --purge --yes ${PACKAGES}" Chroot "apt-get remove --purge --yes ${PACKAGES}"
;; ;;
@ -148,5 +148,5 @@ then
fi fi
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/binary_syslinux Create_stagefile .stage/binary_syslinux
fi fi

View File

@ -17,37 +17,38 @@ Read_conffile config/image
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
Require_stagefile .stage/chroot_proc
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/binary_usb Check_stagefile .stage/binary_usb
for IMAGE in ${LIVE_BINARY_IMAGE} for IMAGE in ${LIVE_BINARY_IMAGE}
do do
if [ "${IMAGE}" = "usb" ] if [ "${IMAGE}" = "usb" ]
then then
if [ ! -f "${LIVE_CHROOT}"/sbin/mkdosfs ] if [ ! -f chroot/sbin/mkdosfs ]
then then
PACKAGES="${PACKAGES} dosfstools" PACKAGES="${PACKAGES} dosfstools"
fi fi
if [ ! -f "${LIVE_CHROOT}"/usr/bin/mtools ] if [ ! -f chroot/usr/bin/mtools ]
then then
PACKAGES="${PACKAGES} mtools" PACKAGES="${PACKAGES} mtools"
fi fi
if [ ! -f "${LIVE_CHROOT}"/sbin/parted ] if [ ! -f chroot/sbin/parted ]
then then
PACKAGES="${PACKAGES} parted" PACKAGES="${PACKAGES} parted"
fi fi
if [ ! -f "${LIVE_CHROOT}"/usr/bin/syslinux ] if [ ! -f chroot/usr/bin/syslinux ]
then then
PACKAGES="${PACKAGES} syslinux" PACKAGES="${PACKAGES} syslinux"
fi fi
@ -56,7 +57,7 @@ do
then then
# Installing packages # Installing packages
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
Chroot "apt-get install --yes ${PACKAGES}" Chroot "apt-get install --yes ${PACKAGES}"
;; ;;
@ -67,52 +68,55 @@ do
fi fi
# Remove old binary # Remove old binary
if [ -f "${LIVE_ROOT}"/binary.img ] if [ -f binary.img ]
then then
rm -f "${LIVE_ROOT}"/binary.img rm -f binary.img
fi fi
# Everything which comes here needs to be cleaned up, # Everything which comes here needs to be cleaned up,
DU_DIM="`du -ms ${LIVE_ROOT}/binary | cut -f1`" DU_DIM="`du -ms binary | cut -f1`"
REAL_DIM="`expr ${DU_DIM} + ${DU_DIM} / 20`" # Just 5% more to be sure, need something more sophistcated here... REAL_DIM="`expr ${DU_DIM} + ${DU_DIM} / 20`" # Just 5% more to be sure, need something more sophistcated here...
dd if=/dev/zero of="${LIVE_ROOT}"/binary.img bs=1024k count=${REAL_DIM} dd if=/dev/zero of=binary.img bs=1024k count=${REAL_DIM}
FREELO="`losetup -f`" FREELO="`${LH_LOSETUP} -f`"
if [ ! -b "${LIVE_CHROOT}"/${FREELO} ] if [ ! -b chroot/${FREELO} ]
then then
MAKEDEV="true" MAKEDEV="true"
Chroot "cd /dev && ./MAKEDEV ${FREELO}"
mv chroot/dev chroot/dev.tmp
find /dev | cpio -dmpu chroot
fi fi
echo "!!! The following error/warning messages can be ignored !!!" echo "!!! The following error/warning messages can be ignored !!!"
lh_losetup $FREELO "${LIVE_ROOT}"/binary.img 0 lh_losetup $FREELO binary.img 0
Chroot "parted -s ${FREELO} mklabel msdos" || true Chroot "parted -s ${FREELO} mklabel msdos" || true
Chroot "parted -s ${FREELO} mkpartfs primary fat16 0.0 100%" || true Chroot "parted -s ${FREELO} mkpartfs primary fat16 0.0 100%" || true
Chroot "parted -s ${FREELO} set 1 boot on" || true Chroot "parted -s ${FREELO} set 1 boot on" || true
Chroot "parted -s ${FREELO} set 1 lba off" || true Chroot "parted -s ${FREELO} set 1 lba off" || true
cat "${LIVE_CHROOT}"/usr/lib/syslinux/mbr.bin > ${FREELO} cat chroot/usr/lib/syslinux/mbr.bin > ${FREELO}
losetup -d ${FREELO} ${LH_LOSETUP} -d ${FREELO}
lh_losetup $FREELO "${LIVE_ROOT}"/binary.img 1 lh_losetup $FREELO binary.img 1
Chroot "mkfs.msdos -n DEBIAN_LIVE ${FREELO}" Chroot "mkfs.msdos -n DEBIAN_LIVE ${FREELO}"
mkdir -p "${LIVE_ROOT}"/binary.tmp mkdir -p binary.tmp
mount ${FREELO} "${LIVE_ROOT}"/binary.tmp mount ${FREELO} binary.tmp
cp -r "${LIVE_ROOT}"/binary/* "${LIVE_ROOT}"/binary.tmp cp -r binary/* binary.tmp
umount "${LIVE_ROOT}"/binary.tmp umount binary.tmp
rmdir "${LIVE_ROOT}"/binary.tmp rmdir binary.tmp
Chroot "syslinux ${FREELO}" Chroot "syslinux ${FREELO}"
losetup -d ${FREELO} ${LH_LOSETUP} -d ${FREELO}
echo "!!! The above error/warning messages can be ignored !!!" echo "!!! The above error/warning messages can be ignored !!!"
if [ -n "${MAKEDEV}" ] if [ -n "${MAKEDEV}" ]
then then
rm -f "${LIVE_CHROOT}"/${FREELO} rm -f chroot/dev
mv chroot/dev.tmp chroot/dev
fi fi
if [ -n "${PACKAGES}" ] if [ -n "${PACKAGES}" ]
then then
# Removing packages # Removing packages
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
Chroot "apt-get remove --purge --yes ${PACKAGES}" Chroot "apt-get remove --purge --yes ${PACKAGES}"
;; ;;
@ -121,8 +125,8 @@ do
;; ;;
esac esac
fi fi
fi
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/binary_usb Create_stagefile .stage/binary_usb
fi
done done

View File

@ -12,7 +12,6 @@ done
# Reading configuration files # Reading configuration files
Read_conffile config/common Read_conffile config/common
Read_conffile config/bootstrap
Set_defaults Set_defaults
# Bootstrapping system # Bootstrapping system

View File

@ -19,24 +19,18 @@ Read_conffile config/bootstrap
Set_defaults Set_defaults
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/bootstrap Check_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Creating root directory
if [ ! -d "${LIVE_ROOT}" ]
then
mkdir -p "${LIVE_ROOT}"
fi
# Creating chroot directory # Creating chroot directory
if [ ! -d "${LIVE_CHROOT}" ] if [ ! -d chroot ]
then then
mkdir -p "${LIVE_CHROOT}" mkdir -p chroot
fi fi
# Setting cdebootstrap options # Setting cdebootstrap options
@ -60,44 +54,44 @@ fi
if [ -x "/usr/bin/cdebootstrap" ] if [ -x "/usr/bin/cdebootstrap" ]
then then
# Restore old cache # Restore old cache
if [ -d "${LIVE_ROOT}"/cache/bootstrap ] if [ -d cache/bootstrap ]
then then
mkdir -p "${LIVE_CHROOT}"/var/cache/bootstrap mkdir -p chroot/var/cache/bootstrap
cp "${LIVE_ROOT}"/cache/bootstrap/*.deb "${LIVE_CHROOT}"/var/cache/bootstrap cp cache/bootstrap/*.deb chroot/var/cache/bootstrap
fi fi
if [ "${LH_CACHE}" = "enabled" ] if [ "${LH_CACHE}" = "enabled" ]
then then
# Executing cdebootstrap (download-only) # Executing cdebootstrap (download-only)
cdebootstrap ${CDEBOOTSTRAP_OPTIONS} --download-only "${LIVE_DISTRIBUTION}" "${LIVE_CHROOT}" "${LIVE_MIRROR}" cdebootstrap ${CDEBOOTSTRAP_OPTIONS} --download-only "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_LOCAL}"
# Removing old cache # Removing old cache
if [ -d "${LIVE_ROOT}"/cache/bootstrap ] if [ -d cache/bootstrap ]
then then
rm -f "${LIVE_ROOT}"/cache/bootstrap/*.deb rm -f cache/bootstrap/*.deb
fi fi
# Saving new cache # Saving new cache
if [ ! -d "${LIVE_ROOT}"/cache/bootstrap ] if [ ! -d cache/bootstrap ]
then then
mkdir -p "${LIVE_ROOT}"/cache/bootstrap mkdir -p cache/bootstrap
fi fi
cp "${LIVE_CHROOT}"/var/cache/bootstrap/*.deb "${LIVE_ROOT}"/cache/bootstrap cp chroot/var/cache/bootstrap/*.deb cache/bootstrap
fi fi
# Executing cdebootstrap (regular run) # Executing cdebootstrap (regular run)
cdebootstrap ${CDEBOOTSTRAP_OPTIONS} "${LIVE_DISTRIBUTION}" "${LIVE_CHROOT}" "${LIVE_MIRROR}" cdebootstrap ${CDEBOOTSTRAP_OPTIONS} "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_LOCAL}"
else else
echo "E: Can't process file /usr/bin/cdebootstrap (FIXME)" echo "E: Can't process file /usr/bin/cdebootstrap (FIXME)"
exit 1 exit 1
fi fi
# Removing bootstrap cache # Removing bootstrap cache
if [ -d "${LIVE_CHROOT}/var/cache/bootstrap" ] if [ -d chroot/var/cache/bootstrap ]
then then
rm -rf "${LIVE_CHROOT}"/var/cache/bootstrap rm -rf chroot/var/cache/bootstrap
fi fi
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/bootstrap Create_stagefile .stage/bootstrap

View File

@ -19,24 +19,18 @@ Read_conffile config/bootstrap
Set_defaults Set_defaults
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/bootstrap Check_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Creating root directory
if [ ! -d "${LIVE_ROOT}" ]
then
mkdir -p "${LIVE_ROOT}"
fi
# Creating chroot directory # Creating chroot directory
if [ ! -d "${LIVE_CHROOT}" ] if [ ! -d chroot ]
then then
mkdir -p "${LIVE_CHROOT}" mkdir -p chroot
fi fi
# Setting debootstrap options # Setting debootstrap options
@ -53,41 +47,41 @@ fi
if [ -x "/usr/sbin/debootstrap" ] if [ -x "/usr/sbin/debootstrap" ]
then then
# Restore old cache # Restore old cache
if [ -d "${LIVE_ROOT}"/cache/bootstrap ] if [ -d cache/bootstrap ]
then then
mkdir -p "${LIVE_CHROOT}"/var/cache/apt/archives mkdir -p chroot/var/cache/apt/archives
cp "${LIVE_ROOT}"/cache/bootstrap/*.deb "${LIVE_CHROOT}"/var/cache/apt/archives cp cache/bootstrap/*.deb chroot/var/cache/apt/archives
fi fi
if [ "${LH_CACHE}" = "enabled" ] if [ "${LH_CACHE}" = "enabled" ]
then then
# Executing debootstrap (download-only) # Executing debootstrap (download-only)
debootstrap ${DEBOOTSTRAP_OPTIONS} --download-only "${LIVE_DISTRIBUTION}" "${LIVE_CHROOT}" "${LIVE_MIRROR}" "${LIVE_DEBOOTSTRAP_SCRIPT}" debootstrap ${DEBOOTSTRAP_OPTIONS} --download-only "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_LOCAL}" "${LIVE_DEBOOTSTRAP_SCRIPT}"
# Removing old cache # Removing old cache
if [ -d "${LIVE_ROOT}"/cache/bootstrap ] if [ -d cache/bootstrap ]
then then
rm -f "${LIVE_ROOT}"/cache/bootstrap/*.deb rm -f cache/bootstrap/*.deb
fi fi
# Saving new cache # Saving new cache
if [ ! -d "${LIVE_ROOT}"/cache/bootstrap ] if [ ! -d cache/bootstrap ]
then then
mkdir -p "${LIVE_ROOT}"/cache/bootstrap mkdir -p cache/bootstrap
fi fi
cp "${LIVE_CHROOT}"/var/cache/apt/archives/*.deb "${LIVE_ROOT}"/cache/bootstrap cp chroot/var/cache/apt/archives/*.deb cache/bootstrap
fi fi
# Executing debootstrap (regular run) # Executing debootstrap (regular run)
debootstrap ${DEBOOTSTRAP_OPTIONS} "${LIVE_DISTRIBUTION}" "${LIVE_CHROOT}" "${LIVE_MIRROR}" "${LIVE_DEBOOTSTRAP_SCRIPT}" debootstrap ${DEBOOTSTRAP_OPTIONS} "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_LOCAL}" "${LIVE_DEBOOTSTRAP_SCRIPT}"
else else
echo "E: Can't process file /usr/bin/debootstrap (FIXME)" echo "E: Can't process file /usr/bin/debootstrap (FIXME)"
exit 1 exit 1
fi fi
# Removing bootstrap cache # Removing bootstrap cache
rm -rf "${LIVE_CHROOT}"/var/cache/apt/archives/*.deb rm -rf chroot/var/cache/apt/archives/*.deb
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/bootstrap Create_stagefile .stage/bootstrap

View File

@ -16,34 +16,34 @@ Read_conffile config/chroot
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
case "${1}" in case "${1}" in
install) install)
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/chroot_apt Check_stagefile .stage/chroot_apt
if [ "${LH_APT}" = "aptitude" ] && [ ! -d "${LIVE_CHROOT}"/etc/apt/apt.conf.d ] if [ "${LH_APT}" = "aptitude" ] && [ ! -d chroot/etc/apt/apt.conf.d ]
then then
mkdir -p "${LIVE_CHROOT}"/etc/apt/apt.conf.d mkdir -p chroot/etc/apt/apt.conf.d
fi fi
# Configuring apt ftp proxy # Configuring apt ftp proxy
if [ -n "${LH_APT_FTPPROXY}" ] if [ -n "${LH_APT_FTPPROXY}" ]
then then
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
echo "Acquire::ftp::Proxy \"${LH_APT_FTPPROXY}\";" >> "${LIVE_CHROOT}"/etc/apt/apt.conf echo "Acquire::ftp::Proxy \"${LH_APT_FTPPROXY}\";" >> chroot/etc/apt/apt.conf
;; ;;
aptitude) aptitude)
echo "Acquire::ftp::Proxy \"${LH_APT_FTPPROXY}\";" > "${LIVE_CHROOT}"/etc/apt/apt.conf.d/ftp-proxy echo "Acquire::ftp::Proxy \"${LH_APT_FTPPROXY}\";" > chroot/etc/apt/apt.conf.d/ftp-proxy
;; ;;
esac esac
fi fi
@ -52,12 +52,12 @@ case "${1}" in
if [ -n "${LH_APT_HTTPPROXY}" ] if [ -n "${LH_APT_HTTPPROXY}" ]
then then
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
echo "Acquire::http::Proxy \"${LH_APT_HTTPPROXY}\";" >> "${LIVE_CHROOT}"/etc/apt/apt.conf echo "Acquire::http::Proxy \"${LH_APT_HTTPPROXY}\";" >> chroot/etc/apt/apt.conf
;; ;;
aptitude) aptitude)
echo "Acquire::http::Proxy \"${LH_APT_HTTPPROXY}\";" > "${LIVE_CHROOT}"/etc/apt/apt.conf.d/http-proxy echo "Acquire::http::Proxy \"${LH_APT_HTTPPROXY}\";" > chroot/etc/apt/apt.conf.d/http-proxy
;; ;;
esac esac
fi fi
@ -66,22 +66,22 @@ case "${1}" in
if [ "${LH_APT_PDIFFS}" = "enabled" ] if [ "${LH_APT_PDIFFS}" = "enabled" ]
then then
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
echo "Acquire::PDiffs \"true\";" >> "${LIVE_CHROOT}"/etc/apt/apt.conf echo "Acquire::PDiffs \"true\";" >> chroot/etc/apt/apt.conf
;; ;;
aptitude) aptitude)
echo "Acquire::PDiffs \"true\";" > "${LIVE_CHROOT}"/etc/apt/apt.conf.d/pdiffs echo "Acquire::PDiffs \"true\";" > chroot/etc/apt/apt.conf.d/pdiffs
;; ;;
esac esac
else else
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
echo "Acquire::PDiffs \"false\";" >> "${LIVE_CHROOT}"/etc/apt/apt.conf echo "Acquire::PDiffs \"false\";" >> chroot/etc/apt/apt.conf
;; ;;
aptitude) aptitude)
echo "Acquire::PDiffs \"false\";" > "${LIVE_CHROOT}"/etc/apt/apt.conf.d/pdiffs echo "Acquire::PDiffs \"false\";" > chroot/etc/apt/apt.conf.d/pdiffs
;; ;;
esac esac
fi fi
@ -90,48 +90,48 @@ case "${1}" in
if [ "${LH_APT_RECOMMENDS}" = "enabled" ] if [ "${LH_APT_RECOMMENDS}" = "enabled" ]
then then
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
echo "Aptitude::Recommends-Important \"true\";" >> "${LIVE_CHROOT}"/etc/apt/apt.conf echo "Aptitude::Recommends-Important \"true\";" >> chroot/etc/apt/apt.conf
;; ;;
aptitude) aptitude)
echo "Aptitude::Recommends-Important \"true\";" > "${LIVE_CHROOT}"/etc/apt/apt.conf.d/recommends echo "Aptitude::Recommends-Important \"true\";" > chroot/etc/apt/apt.conf.d/recommends
;; ;;
esac esac
else else
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
echo "Aptitude::Recommends-Important \"false\";" >> "${LIVE_CHROOT}"/etc/apt/apt.conf echo "Aptitude::Recommends-Important \"false\";" >> chroot/etc/apt/apt.conf
;; ;;
aptitude) aptitude)
echo "Aptitude::Recommends-Important \"false\";" > "${LIVE_CHROOT}"/etc/apt/apt.conf.d/recommends echo "Aptitude::Recommends-Important \"false\";" > chroot/etc/apt/apt.conf.d/recommends
;; ;;
esac esac
fi fi
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/chroot_apt Create_stagefile .stage/chroot_apt
;; ;;
remove) remove)
# Deconfiguring apt settings # Deconfiguring apt settings
rm -f "${LIVE_CHROOT}"/etc/apt/apt.conf rm -f chroot/etc/apt/apt.conf
# Deconfiguring aptitude ftp proxy # Deconfiguring aptitude ftp proxy
rm -f "${LIVE_CHROOT}"/etc/apt/apt.conf.d/ftp-proxy rm -f chroot/etc/apt/apt.conf.d/ftp-proxy
# Deconfiguring aptitude http proxy # Deconfiguring aptitude http proxy
rm -f "${LIVE_CHROOT}"/etc/apt/apt.conf.d/http-proxy rm -f chroot/etc/apt/apt.conf.d/http-proxy
# Deconfiguring aptitude pdiffs # Deconfiguring aptitude pdiffs
rm -f "${LIVE_CHROOT}"/etc/apt/apt.conf.d/pdiffs rm -f chroot/etc/apt/apt.conf.d/pdiffs
# Deconfiguring aptitude recommends # Deconfiguring aptitude recommends
rm -f "${LIVE_CHROOT}"/etc/apt/apt.conf.d/recommends rm -f chroot/etc/apt/apt.conf.d/recommends
# Removing stage file # Removing stage file
rm -f "${LIVE_ROOT}"/.stage/chroot_apt rm -f .stage/chroot_apt
;; ;;
*) *)

View File

@ -16,44 +16,44 @@ Read_conffile config/chroot
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
case "${1}" in case "${1}" in
install) install)
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/chroot_debianchroot Check_stagefile .stage/chroot_debianchroot
if [ -f "${LIVE_CHROOT}"/etc/debian_chroot ] if [ -f chroot/etc/debian_chroot ]
then then
# Save chroot file # Save chroot file
mv "${LIVE_CHROOT}"/etc/debian_chroot "${LIVE_CHROOT}"/etc/debian_chroot.orig mv chroot/etc/debian_chroot chroot/etc/debian_chroot.orig
fi fi
# Create chroot file # Create chroot file
echo "live" > "${LIVE_CHROOT}"/etc/debian_chroot echo "live" > chroot/etc/debian_chroot
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/chroot_debianchroot Create_stagefile .stage/chroot_debianchroot
;; ;;
remove) remove)
if [ -f "${LIVE_CHROOT}"/etc/debian_chroot.orig ] if [ -f chroot/etc/debian_chroot.orig ]
then then
# Restore chroot file # Restore chroot file
mv "${LIVE_CHROOT}"/etc/debian_chroot.orig "${LIVE_CHROOT}"/etc/debian_chroot mv chroot/etc/debian_chroot.orig chroot/etc/debian_chroot
else else
# Remove chroot file # Remove chroot file
rm -f "${LIVE_CHROOT}"/etc/debian_chroot rm -f chroot/etc/debian_chroot
fi fi
# Removing stage file # Removing stage file
rm -f "${LIVE_ROOT}"/.stage/chroot_debianchroot rm -f .stage/chroot_debianchroot
;; ;;
*) *)

View File

@ -16,16 +16,16 @@ Read_conffile config/chroot
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/chroot_hacks Check_stagefile .stage/chroot_hacks
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Removing udev mac caching rule # Removing udev mac caching rule
rm -f chroot/etc/udev/rules.d/z25_persistent-net.rules rm -f chroot/etc/udev/rules.d/z25_persistent-net.rules
@ -33,7 +33,7 @@ rm -f chroot/etc/udev/rules.d/z25_persistent-net.rules
case "${LIVE_BINARY_IMAGE}" in case "${LIVE_BINARY_IMAGE}" in
net) net)
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
Chroot "apt-get install --yes smbfs" Chroot "apt-get install --yes smbfs"
;; ;;
@ -42,13 +42,13 @@ case "${LIVE_BINARY_IMAGE}" in
;; ;;
esac esac
if [ ! -d "${LIVE_CHROOT}"/etc/initramfs-tools ] if [ ! -d chroot/etc/initramfs-tools ]
then then
mkdir "${LIVE_CHROOT}"/etc/initramfs-tools mkdir chroot/etc/initramfs-tools
fi fi
# Configuring initramfs for NFS # Configuring initramfs for NFS
cat >> "${LIVE_CHROOT}"/etc/initramfs-tools/initramfs.conf << EOF cat >> chroot/etc/initramfs-tools/initramfs.conf << EOF
MODULES=netboot MODULES=netboot
BOOT=nfs BOOT=nfs
NFSROOT=auto NFSROOT=auto
@ -60,4 +60,4 @@ esac
Chroot "update-initramfs -tu" Chroot "update-initramfs -tu"
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/chroot_hacks Create_stagefile .stage/chroot_hacks

View File

@ -16,35 +16,35 @@ Read_conffile config/chroot
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/chroot_hooks Check_stagefile .stage/chroot_hooks
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Processing hooks # Processing hooks
if [ -n "${LIVE_PACKAGES_LIST}" ] && [ -f /usr/share/live-helper/hooks/"${LIVE_PACKAGES_LIST}" ] if [ -n "${LIVE_PACKAGES_LIST}" ] && [ -f /usr/share/live-helper/hooks/"${LIVE_PACKAGES_LIST}" ]
then then
# Copying hook # Copying hook
cp /usr/share/live-helper/hooks/"${LIVE_PACKAGES_LIST}" "${LIVE_CHROOT}"/root cp /usr/share/live-helper/hooks/"${LIVE_PACKAGES_LIST}" chroot/root
# Making hook executable # Making hook executable
if [ -x "${LIVE_CHROOT}"/root/${LIVE_PACKAGES_LIST} ] if [ ! -x chroot/root/${LIVE_PACKAGES_LIST} ]
then then
chmod +x "${LIVE_CHROOT}"/root/${LIVE_PACKAGES_LIST} chmod +x chroot/root/${LIVE_PACKAGES_LIST}
fi fi
# Executing hook # Executing hook
Chroot "/root/${LIVE_PACKAGES_LIST}" Chroot "/root/${LIVE_PACKAGES_LIST}"
# Removing hook # Removing hook
rm -f "${LIVE_CHROOT}"/root/"${LIVE_PACKAGE_LIST}" rm -f chroot/root/"${LIVE_PACKAGE_LIST}"
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/chroot_hooks Create_stagefile .stage/chroot_hooks
fi fi

View File

@ -16,47 +16,47 @@ Read_conffile config/chroot
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
case "${1}" in case "${1}" in
install) install)
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/chroot_hosts Check_stagefile .stage/chroot_hosts
if [ -f "${LIVE_CHROOT}"/etc/hosts ] if [ -f chroot/etc/hosts ]
then then
# Save hosts file # Save hosts file
cp "${LIVE_CHROOT}"/etc/hosts "${LIVE_CHROOT}"/etc/hosts.orig cp chroot/etc/hosts chroot/etc/hosts.orig
fi fi
if [ -f /etc/hosts ] if [ -f /etc/hosts ]
then then
# Copy hosts file # Copy hosts file
cp /etc/hosts "${LIVE_CHROOT}"/etc/hosts cp /etc/hosts chroot/etc/hosts
fi fi
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/chroot_hosts Create_stagefile .stage/chroot_hosts
;; ;;
remove) remove)
if [ -f "${LIVE_CHROOT}"/etc/hosts.orig ] if [ -f chroot/etc/hosts.orig ]
then then
# Restore hosts file # Restore hosts file
mv "${LIVE_CHROOT}"/etc/hosts.orig "${LIVE_CHROOT}"/etc/hosts mv chroot/etc/hosts.orig chroot/etc/hosts
else else
# Remove hosts file # Remove hosts file
rm -f "${LIVE_CHROOT}"/etc/hosts rm -f chroot/etc/hosts
fi fi
# Removing stage file # Removing stage file
rm -f "${LIVE_ROOT}"/.stage/chroot_hosts rm -f .stage/chroot_hosts
;; ;;
*) *)

View File

@ -16,34 +16,34 @@ Read_conffile config/chroot
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
case "${1}" in case "${1}" in
install) install)
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/chroot_linuximage Check_stagefile .stage/chroot_linuximage
if [ -f "${LIVE_CHROOT}"/etc/kernel-img.conf ] if [ -f chroot/etc/kernel-img.conf ]
then then
# Saving kernel-img.conf # Saving kernel-img.conf
cp "${LIVE_CHROOT}"/etc/kernel-img.conf "${LIVE_CHROOT}"/etc/kernel-img.conf.old cp chroot/etc/kernel-img.conf chroot/etc/kernel-img.conf.old
fi fi
# Configuring kernel-img.conf # Configuring kernel-img.conf
echo "do_initrd = Yes" >> "${LIVE_CHROOT}"/etc/kernel-img.conf echo "do_initrd = Yes" >> chroot/etc/kernel-img.conf
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/chroot_linuximage Create_stagefile .stage/chroot_linuximage
# Installing linux-image, modules and casper # Installing linux-image, modules and casper
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
Chroot "apt-get install --yes ${LIVE_KERNEL_PACKAGES}" Chroot "apt-get install --yes ${LIVE_KERNEL_PACKAGES}"
;; ;;
@ -54,17 +54,17 @@ case "${1}" in
;; ;;
remove) remove)
if [ -f "${LIVE_CHROOT}"/etc/kernel-img.conf.old ] if [ -f chroot/etc/kernel-img.conf.old ]
then then
# Restoring kernel-img.conf file # Restoring kernel-img.conf file
mv "${LIVE_CHROOT}"/etc/kernel-img.conf.old "${LIVE_CHROOT}"/etc/kernel-img.conf mv chroot/etc/kernel-img.conf.old chroot/etc/kernel-img.conf
else else
# Removing kernel-img.conf file # Removing kernel-img.conf file
rm -f "${LIVE_CHROOT}"/etc/kernel-img.conf rm -f chroot/etc/kernel-img.conf
fi fi
# Removing stage file # Removing stage file
rm -f "${LIVE_ROOT}"/.stage/chroot_linuximage rm -f .stage/chroot_linuximage
;; ;;
*) *)

View File

@ -16,38 +16,38 @@ Read_conffile config/chroot
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/chroot_localhooks Check_stagefile .stage/chroot_localhooks
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Processing localhooks # Processing localhooks
if ls "${LIVE_ROOT}"/config/chroot_localhooks/* &> /dev/null if ls config/chroot_localhooks/* &> /dev/null
then then
for HOOK in "${LIVE_ROOT}"/config/chroot_localhooks/* for HOOK in config/chroot_localhooks/*
do do
# Copying hook # Copying hook
cp "${HOOK}" "${LIVE_CHROOT}"/root cp "${HOOK}" chroot/root
# Making hook executable # Making hook executable
if [ -x "${LIVE_CHROOT}"/root/"${HOOK}" ] if [ ! -x chroot/root/"`basename ${HOOK}`" ]
then then
chmod +x "${LIVE_CHROOT}"/root/${HOOK} chmod +x chroot/root/"`basename ${HOOK}`"
fi fi
# Executing hook # Executing hook
Chroot "/root/`basename ${HOOK}`" Chroot "/root/`basename ${HOOK}`"
# Removing hook # Removing hook
rm -f "${LIVE_CHROOT}"/"`basename ${HOOK}`" rm -f chroot/"`basename ${HOOK}`"
done done
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/chroot_localhooks Create_stagefile .stage/chroot_localhooks
fi fi

View File

@ -16,24 +16,24 @@ Read_conffile config/chroot
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/chroot_localincludes Check_stagefile .stage/chroot_localincludes
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
if ls "${LIVE_ROOT}"/config/chroot_localincludes/* &> /dev/null if ls config/chroot_localincludes/* &> /dev/null
then then
cd "${LIVE_ROOT}"/config/chroot_localincludes
# Copying includes # Copying includes
find . | cpio -dmpu "${LIVE_CHROOT}" cd config/chroot_localincludes
find . | cpio -dmpu ../../chroot
cd "${OLDPWD}"
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/chroot_localincludes Create_stagefile .stage/chroot_localincludes
fi fi

View File

@ -16,16 +16,16 @@ Read_conffile config/chroot
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/chroot_localization Check_stagefile .stage/chroot_localization
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Setting localizations # Setting localizations
if [ -n "${LIVE_LANGUAGE}" ] if [ -n "${LIVE_LANGUAGE}" ]
@ -617,42 +617,42 @@ then
do do
case "${LOCALZATION}" in case "${LOCALZATION}" in
iceape) iceape)
if [ -f "${LIVE_CHROOT}"/usr/bin/iceape ] if [ -f chroot/usr/bin/iceape ]
then then
PACKAGES="${PACKAGES} iceweasel-l10n-${ICEAPE}" PACKAGES="${PACKAGES} iceweasel-l10n-${ICEAPE}"
fi fi
;; ;;
icedove) icedove)
if [ -f "${LIVE_CHROOT}"/usr/bin/icedove ] if [ -f chroot/usr/bin/icedove ]
then then
PACKAGES="${PACKAGES} icedove-locale-${ICEDOVE}" PACKAGES="${PACKAGES} icedove-locale-${ICEDOVE}"
fi fi
;; ;;
iceweasel) iceweasel)
if [ -f "${LIVE_CHROOT}"/usr/bin/iceweasel ] if [ -f chroot/usr/bin/iceweasel ]
then then
PACKAGES="${PACKAGES} iceweasel-l10n-${ICEWEASEL}" PACKAGES="${PACKAGES} iceweasel-l10n-${ICEWEASEL}"
fi fi
;; ;;
kde) kde)
if [ -f "${LIVE_CHROOT}"/usr/bin/kstart ] if [ -f chroot/usr/bin/kstart ]
then then
PACKAGES="${PACKAGES} kde-i18n-${KDE}" PACKAGES="${PACKAGES} kde-i18n-${KDE}"
fi fi
;; ;;
koffice) koffice)
if [ -f "${LIVE_CHROOT}" ] if [ -f chroot/usr/bin/usr/bin/koconverter ]
then then
PACKAGES="${PACKAGES} koffice-i18n-${KOFFICE}" PACKAGES="${PACKAGES} koffice-i18n-${KOFFICE}"
fi fi
;; ;;
openoffice) openoffice)
if [ -f "${LIVE_CHROOT}"/usr/bin/ooffice ] if [ -f chroot/usr/bin/ooffice ]
then then
PACKAGES="${PACKAGES} openoffice.org-l10n-${OPENOFFICE}" PACKAGES="${PACKAGES} openoffice.org-l10n-${OPENOFFICE}"
fi fi
@ -661,14 +661,14 @@ then
done done
# Restore old cache # Restore old cache
if [ -d "${LIVE_ROOT}"/cache/chroot_localization ] if [ -d cache/chroot_localization ]
then then
cp "${LIVE_ROOT}"/cache/chroot_localization/*.deb "${LIVE_CHROOT}"/var/cache/apt/archives cp cache/chroot_localization/*.deb chroot/var/cache/apt/archives
fi fi
# Installing packages # Installing packages
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
Chroot "apt-get install --yes ${PACKAGES}" Chroot "apt-get install --yes ${PACKAGES}"
;; ;;
@ -680,16 +680,16 @@ then
# Saving new cache # Saving new cache
Chroot "apt-get autoclean" Chroot "apt-get autoclean"
if ls "${LIVE_CHROOT}"/var/cache/apt/archives/*.deb &> /dev/null if ls chroot/var/cache/apt/archives/*.deb &> /dev/null
then then
if [ ! -d "${LIVE_ROOT}"/cache/chroot_localization ] if [ ! -d cache/chroot_localization ]
then then
mkdir -p "${LIVE_ROOT}"/cache/chroot_localization mkdir -p cache/chroot_localization
fi fi
mv -f "${LIVE_CHROOT}"/var/cache/apt/archives/*.deb "${LIVE_ROOT}"/cache/chroot_localization mv -f chroot/var/cache/apt/archives/*.deb cache/chroot_localization
fi fi
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/chroot_localization Create_stagefile .stage/chroot_localization
fi fi

View File

@ -16,35 +16,35 @@ Read_conffile config/chroot
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/chroot_localpackages Check_stagefile .stage/chroot_localpackages
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
if ls "${LIVE_ROOT}"/config/chroot_localpackages/*.deb &> /dev/null if ls config/chroot_localpackages/*.deb &> /dev/null
then then
# Restore old cache # Restore old cache
if [ -d "${LIVE_ROOT}"/cache/chroot_localpackages ] if [ -d cache/chroot_localpackages ]
then then
cp "${LIVE_ROOT}"/cache/chroot_localpackages/*.deb "${LIVE_CHROOT}"/var/cache/apt/archives cp cache/chroot_localpackages/*.deb chroot/var/cache/apt/archives
fi fi
# Copying packages # Copying packages
cp "${LIVE_ROOT}"/config/chroot_localpackages/*.deb "${LIVE_CHROOT}"/root cp config/chroot_localpackages/*.deb chroot/root
# Installing packages # Installing packages
Chroot "find /root -name *.deb" > "${LIVE_CHROOT}"/root/localpackages Chroot "find /root -name *.deb" > chroot/root/localpackages
Chroot "xargs --arg-file=/root/localpackages dpkg -i" || true Chroot "xargs --arg-file=/root/localpackages dpkg -i" || true
# Cleaning dependencies # Cleaning dependencies
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
Chroot "apt-get install -f --yes" Chroot "apt-get install -f --yes"
;; ;;
@ -54,22 +54,22 @@ then
esac esac
# Removing package files # Removing package files
rm -f "${LIVE_CHROOT}"/root/*.deb rm -f chroot/root/*.deb
rm -f "${LIVE_CHROOT}"/root/localpackages rm -f chroot/root/localpackages
# Saving new cache # Saving new cache
Chroot "apt-get autoclean" Chroot "apt-get autoclean"
if ls "${LIVE_CHROOT}"/var/cache/apt/archives/*.deb &> /dev/null if ls chroot/var/cache/apt/archives/*.deb &> /dev/null
then then
if [ ! -d "${LIVE_ROOT}"/cache/chroot_localpackages ] if [ ! -d cache/chroot_localpackages ]
then then
mkdir -p "${LIVE_ROOT}"/cache/chroot_localpackages mkdir -p cache/chroot_localpackages
fi fi
mv -f "${LIVE_CHROOT}"/var/cache/apt/archives/*.deb "${LIVE_ROOT}"/cache/chroot_localpackages mv -f chroot/var/cache/apt/archives/*.deb cache/chroot_localpackages
fi fi
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/chroot_localpackages Create_stagefile .stage/chroot_localpackages
fi fi

View File

@ -16,33 +16,33 @@ Read_conffile config/chroot
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/chroot_localpackageslist Check_stagefile .stage/chroot_localpackageslist
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
if ls "${LIVE_ROOT}"/config/chroot_localpackageslist/* &> /dev/null if ls config/chroot_localpackageslist/* &> /dev/null
then then
# Restore old cache # Restore old cache
if [ -d "${LIVE_ROOT}"/cache/chroot_localpackageslist ] if [ -d cache/chroot_localpackageslist ]
then then
cp "${LIVE_ROOT}"/cache/chroot_localpackageslist/*.deb "${LIVE_CHROOT}"/var/cache/apt/archives cp cache/chroot_localpackageslist/*.deb chroot/var/cache/apt/archives
fi fi
for PACKAGESLIST in "${LIVE_ROOT}"/config/chroot_localpackageslist/* for PACKAGESLIST in config/chroot_localpackageslist/*
do do
# Copying package list # Copying package list
grep -v "^#" "${PACKAGESLIST}" > "${LIVE_CHROOT}"/root/"`basename ${PACKAGESLIST}`" grep -v "^#" "${PACKAGESLIST}" > chroot/root/"`basename ${PACKAGESLIST}`"
# Installing package list # Installing package list
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
Chroot "xargs --arg-file=/root/`basename ${PACKAGESLIST}` apt-get install --yes" Chroot "xargs --arg-file=/root/`basename ${PACKAGESLIST}` apt-get install --yes"
;; ;;
@ -52,22 +52,22 @@ then
esac esac
# Removing package list # Removing package list
rm -f "${LIVE_CHROOT}"/root/"`basename ${PACKAGESLIST}`" rm -f chroot/root/"`basename ${PACKAGESLIST}`"
done done
# Saving new cache # Saving new cache
Chroot "apt-get autoclean" Chroot "apt-get autoclean"
if ls "${LIVE_CHROOT}"/var/cache/apt/archives/*.deb &> /dev/null if ls chroot/var/cache/apt/archives/*.deb &> /dev/null
then then
if [ ! -d "${LIVE_ROOT}"/cache/chroot_localpackageslist ] if [ ! -d cache/chroot_localpackageslist ]
then then
mkdir -p "${LIVE_ROOT}"/cache/chroot_localpackageslist mkdir -p cache/chroot_localpackageslist
fi fi
mv -f "${LIVE_CHROOT}"/var/cache/apt/archives/*.deb "${LIVE_ROOT}"/cache/chroot_localpackageslist mv -f chroot/var/cache/apt/archives/*.deb cache/chroot_localpackageslist
fi fi
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/chroot_localpackageslist Create_stagefile .stage/chroot_localpackageslist
fi fi

View File

@ -17,28 +17,28 @@ Read_conffile config/chroot
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/chroot_packages Check_stagefile .stage/chroot_packages
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
if [ -n "${LIVE_PACKAGES}" ] if [ -n "${LIVE_PACKAGES}" ]
then then
# Restore old cache # Restore old cache
if [ -d "${LIVE_ROOT}"/cache/chroot ] if [ -d cache/chroot ]
then then
cp "${LIVE_ROOT}"/cache/chroot_packages/*.deb "${LIVE_CHROOT}"/var/cache/apt/archives cp cache/chroot_packages/*.deb chroot/var/cache/apt/archives
fi fi
# Installing packages # Installing packages
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
Chroot "apt-get install --yes ${LIVE_PACKAGES}" Chroot "apt-get install --yes ${LIVE_PACKAGES}"
;; ;;
@ -50,16 +50,16 @@ then
# Saving new cache # Saving new cache
Chroot "apt-get autoclean" Chroot "apt-get autoclean"
if ls "${LIVE_CHROOT}"/var/cache/apt/archives/*.deb &> /dev/null if ls chroot/var/cache/apt/archives/*.deb &> /dev/null
then then
if [ ! -d "${LIVE_ROOT}"/cache/chroot_packages ] if [ ! -d cache/chroot_packages ]
then then
mkdir -p "${LIVE_ROOT}"/cache/chroot_packages mkdir -p cache/chroot_packages
fi fi
mv -f "${LIVE_CHROOT}"/var/cache/apt/archives/*.deb "${LIVE_ROOT}"/cache/chroot_packages mv -f chroot/var/cache/apt/archives/*.deb cache/chroot_packages
fi fi
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/chroot_packages Create_stagefile .stage/chroot_packages
fi fi

View File

@ -16,23 +16,23 @@ Read_conffile config/chroot
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/chroot_packageslist Check_stagefile .stage/chroot_packageslist
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
if [ -n "${LIVE_PACKAGES_LIST}" ] if [ -n "${LIVE_PACKAGES_LIST}" ]
then then
# Restore old cache # Restore old cache
if [ -d "${LIVE_ROOT}"/cache/chroot_packageslist ] if [ -d cache/chroot_packageslist ]
then then
cp "${LIVE_ROOT}"/cache/chroot_packageslist/*.deb "${LIVE_CHROOT}"/var/cache/apt/archives cp cache/chroot_packageslist/*.deb chroot/var/cache/apt/archives
fi fi
for LIST in ${LIVE_PACKAGES_LIST} for LIST in ${LIVE_PACKAGES_LIST}
@ -40,11 +40,11 @@ then
if [ -f /usr/share/live-helper/lists/"${LIST}" ] if [ -f /usr/share/live-helper/lists/"${LIST}" ]
then then
# Copying package list # Copying package list
grep -v "^#" /usr/share/live-helper/lists/"${LIST}" > "${LIVE_CHROOT}"/root/"${LIST}" grep -v "^#" /usr/share/live-helper/lists/"${LIST}" > chroot/root/"${LIST}"
# Installing package list # Installing package list
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
Chroot "xargs --arg-file=/root/${LIST} apt-get install --yes" Chroot "xargs --arg-file=/root/${LIST} apt-get install --yes"
;; ;;
@ -54,23 +54,23 @@ then
esac esac
# Removing package list # Removing package list
rm -f "${LIVE_CHROOT}"/root/"${LIST}" rm -f chroot/root/"${LIST}"
fi fi
done done
# Saving new cache # Saving new cache
Chroot "apt-get autoclean" Chroot "apt-get autoclean"
if ls "${LIVE_CHROOT}"/var/cache/apt/archives/*.deb &> /dev/null if ls chroot/var/cache/apt/archives/*.deb &> /dev/null
then then
if [ ! -d "${LIVE_ROOT}"/cache/chroot_packageslist ] if [ ! -d cache/chroot_packageslist ]
then then
mkdir -p "${LIVE_ROOT}"/cache/chroot_packageslist mkdir -p cache/chroot_packageslist
fi fi
mv -f "${LIVE_CHROOT}"/var/cache/apt/archives/*.deb "${LIVE_ROOT}"/cache/chroot_packageslist mv -f chroot/var/cache/apt/archives/*.deb cache/chroot_packageslist
fi fi
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/chroot_packageslist Create_stagefile .stage/chroot_packageslist
fi fi

View File

@ -16,42 +16,42 @@ Read_conffile config/chroot
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
case "${1}" in case "${1}" in
install) install)
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/chroot_proc Check_stagefile .stage/chroot_proc
if [ ! -d "${LIVE_CHROOT}"/proc ] if [ ! -d chroot/proc ]
then then
# Creating mountpoint # Creating mountpoint
mkdir -p "${LIVE_CHROOT}"/proc mkdir -p chroot/proc
fi fi
# Mounting /proc # Mounting /proc
mount proc-live -t proc "${LIVE_CHROOT}"/proc mount proc-live -t proc chroot/proc
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/chroot_proc Create_stagefile .stage/chroot_proc
;; ;;
remove) remove)
# Workaround binfmt-support /proc locking # Workaround binfmt-support /proc locking
umount "${LIVE_CHROOT}"/proc/sys/fs/binfmt_misc > /dev/null 2>&1 || true umount chroot/proc/sys/fs/binfmt_misc > /dev/null 2>&1 || true
# Unmounting /proc # Unmounting /proc
#fuser -km "${LIVE_CHROOT}"/proc #fuser -km chroot/proc
umount "${LIVE_CHROOT}"/proc > /dev/null 2>&1 umount chroot/proc > /dev/null 2>&1
# Removing stage file # Removing stage file
rm -f "${LIVE_ROOT}"/.stage/chroot_proc rm -f .stage/chroot_proc
;; ;;
*) *)

View File

@ -16,47 +16,47 @@ Read_conffile config/chroot
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
case "${1}" in case "${1}" in
install) install)
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/chroot_resolv Check_stagefile .stage/chroot_resolv
if [ -f "${LIVE_CHROOT}"/etc/resolv.conf ] if [ -f chroot/etc/resolv.conf ]
then then
# Save resolv file # Save resolv file
cp "${LIVE_CHROOT}"/etc/resolv.conf "${LIVE_CHROOT}"/etc/resolv.conf.orig cp chroot/etc/resolv.conf chroot/etc/resolv.conf.orig
fi fi
if [ -f /etc/resolv.conf ] if [ -f /etc/resolv.conf ]
then then
# Copy resolv file # Copy resolv file
cp /etc/resolv.conf "${LIVE_CHROOT}"/etc/resolv.conf cp /etc/resolv.conf chroot/etc/resolv.conf
fi fi
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/chroot_resolv Create_stagefile .stage/chroot_resolv
;; ;;
remove) remove)
if [ -f "${LIVE_CHROOT}"/etc/resolv.conf.orig ] if [ -f chroot/etc/resolv.conf.orig ]
then then
# Restore resolv file # Restore resolv file
mv "${LIVE_CHROOT}"/etc/resolv.conf.orig "${LIVE_CHROOT}"/etc/resolv.conf mv chroot/etc/resolv.conf.orig chroot/etc/resolv.conf
else else
# Remove resolv file # Remove resolv file
rm -f "${LIVE_CHROOT}"/etc/resolv.conf rm -f chroot/etc/resolv.conf
fi fi
# Removing stage file # Removing stage file
rm -f "${LIVE_ROOT}"/.stage/chroot_resolv rm -f .stage/chroot_resolv
;; ;;
*) *)

View File

@ -18,47 +18,55 @@ Read_conffile config/image
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
case "${1}" in case "${1}" in
install) install)
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/chroot_sources Check_stagefile .stage/chroot_sources
# Configure custom sources.list # Configure custom sources.list
echo "deb ${LIVE_MIRROR} ${LIVE_DISTRIBUTION} ${LIVE_SECTIONS}" > "${LIVE_CHROOT}"/etc/apt/sources.list echo "deb ${LIVE_MIRROR_LOCAL} ${LIVE_DISTRIBUTION} ${LIVE_SECTIONS}" > chroot/etc/apt/sources.list
if [ "${LIVE_SOURCE}" = "enabled" ] if [ "${LIVE_SOURCE}" = "enabled" ]
then then
echo "deb-src ${LIVE_MIRROR} ${LIVE_DISTRIBUTION} ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list echo "deb-src ${LIVE_MIRROR_LOCAL} ${LIVE_DISTRIBUTION} ${LIVE_SECTIONS}" >> chroot/etc/apt/sources.list
fi fi
if [ "${LIVE_SECURITY}" = "enabled" ] if [ "${LIVE_SECURITY}" = "enabled" ]
then then
if [ "${LIVE_DISTRIBUTION}" = "etch" ] || [ "${LIVE_DISTRIBUTION}" = "testing" ] if [ "${LIVE_DISTRIBUTION}" != "sid" ] && [ "${LIVE_DISTRIBUTION}" = "unstable" ]
then then
echo "deb ${LIVE_MIRROR_SECURITY} ${LIVE_DISTRIBUTION}/updates ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list echo "deb ${LIVE_MIRROR_LOCAL_SECURITY} ${LIVE_DISTRIBUTION}/updates ${LIVE_SECTIONS}" >> chroot/etc/apt/sources.list
if [ "${LIVE_SOURCE}" = "yes" ] if [ "${LIVE_SOURCE}" = "yes" ]
then then
echo "deb-src ${LIVE_MIRROR_SECURITY} ${LIVE_DISTRIBUTION}/updates ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list echo "deb-src ${LIVE_MIRROR_LOCAL_SECURITY} ${LIVE_DISTRIBUTION}/updates ${LIVE_SECTIONS}" >> chroot/etc/apt/sources.list
fi fi
fi fi
fi fi
# Check local sources.list
if [ -f config/sources.list.local ]
then
echo "" >> chroot/etc/apt/sources.list
echo "# Custom repositories" >> chroot/etc/apt/sources.list
cat config/sources.list.local >> chroot/etc/apt/sources.list
fi
# Installing aptitude # Installing aptitude
if [ "${LH_APT}" = "apt" ] if [ "${LH_APT}" = "apt" ]
then then
Chroot "apt-get update" Chroot "apt-get update"
elif [ "${LH_APT}" = "aptitude" ] elif [ "${LH_APT}" = "aptitude" ]
then then
if [ ! -x "${LH_CHROOT}"/usr/bin/aptitude ] if [ ! -x /usr/bin/aptitude ]
then then
Chroot "apt-get update" Chroot "apt-get update"
Chroot "apt-get install --yes --force-yes aptitude" Chroot "apt-get install --yes --force-yes aptitude"
@ -68,7 +76,7 @@ case "${1}" in
fi fi
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/chroot_sources Create_stagefile .stage/chroot_sources
;; ;;
remove) remove)
@ -76,31 +84,39 @@ case "${1}" in
if [ "${LH_APT_GENERIC}" = "enabled" ] if [ "${LH_APT_GENERIC}" = "enabled" ]
then then
# Cleaning apt list cache # Cleaning apt list cache
rm -rf "${LIVE_CHROOT}"/var/lib/apt/lists rm -rf chroot/var/lib/apt/lists
mkdir -p "${LIVE_CHROOT}"/var/lib/apt/lists/partial mkdir -p chroot/var/lib/apt/lists/partial
echo "deb ${LIVE_MIRROR_GENERIC} ${LIVE_DISTRIBUTION} ${LIVE_SECTIONS}" > "${LIVE_CHROOT}"/etc/apt/sources.list echo "deb ${LIVE_MIRROR_GENERIC} ${LIVE_DISTRIBUTION} ${LIVE_SECTIONS}" > chroot/etc/apt/sources.list
if [ "${LIVE_SOURCE}" = "enabled" ] if [ "${LIVE_SOURCE}" = "enabled" ]
then then
echo "deb-src ${LIVE_MIRROR_GENERIC} ${LIVE_DISTRIBUTION} ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list echo "deb-src ${LIVE_MIRROR_GENERIC} ${LIVE_DISTRIBUTION} ${LIVE_SECTIONS}" >> chroot/etc/apt/sources.list
fi fi
if [ "${LIVE_SECURITY}" = "enabled" ] if [ "${LIVE_SECURITY}" = "enabled" ]
then then
if [ "${LIVE_DISTRIBUTION}" = "etch" ] || [ "${LIVE_DISTRIBUTION}" = "testing" ] if [ "${LIVE_DISTRIBUTION}" = "etch" ] || [ "${LIVE_DISTRIBUTION}" = "testing" ]
then then
echo "deb ${LIVE_MIRROR_GENERIC_SECURITY} ${LIVE_DISTRIBUTION}/updates ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list echo "deb ${LIVE_MIRROR_GENERIC_SECURITY} ${LIVE_DISTRIBUTION}/updates ${LIVE_SECTIONS}" >> chroot/etc/apt/sources.list
if [ "${LIVE_SOURCE}" = "yes" ] if [ "${LIVE_SOURCE}" = "yes" ]
then then
echo "deb-src ${LIVE_MIRROR_GENERIC_SECURITY} ${LIVE_DISTRIBUTION}/updates ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list echo "deb-src ${LIVE_MIRROR_GENERIC_SECURITY} ${LIVE_DISTRIBUTION}/updates ${LIVE_SECTIONS}" >> chroot/etc/apt/sources.list
fi fi
fi fi
fi fi
# Check local sources.list
if [ -f config/sources.list.generic ]
then
echo "" >> chroot/etc/apt/sources.list
echo "# Custom repositories" >> chroot/etc/apt/sources.list
cat config/sources.list.generic >> chroot/etc/apt/sources.list
fi
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
Chroot "apt-get update" Chroot "apt-get update"
;; ;;
@ -111,17 +127,17 @@ case "${1}" in
fi fi
# Cleaning apt packages cache # Cleaning apt packages cache
rm -rf "${LIVE_CHROOT}"/var/cache/apt rm -rf chroot/var/cache/apt
mkdir -p "${LIVE_CHROOT}"/var/cache/apt/archives/partial mkdir -p chroot/var/cache/apt/archives/partial
# Removing old files # Removing old files
rm -f "${LIVE_CHROOT}"/var/lib/dpkg/available-old rm -f chroot/var/lib/dpkg/available-old
rm -f "${LIVE_CHROOT}"/var/lib/dpkg/diversions-old rm -f chroot/var/lib/dpkg/diversions-old
rm -f "${LIVE_CHROOT}"/var/lib/dpkg/statoverride-old rm -f chroot/var/lib/dpkg/statoverride-old
rm -f "${LIVE_CHROOT}"/var/lib/dpkg/status-old rm -f chroot/var/lib/dpkg/status-old
# Removing stage file # Removing stage file
rm -f "${LIVE_ROOT}"/.stage/chroot_sources rm -f .stage/chroot_sources
;; ;;
*) *)

View File

@ -16,20 +16,20 @@ Read_conffile config/chroot
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/chroot_symlinks Check_stagefile .stage/chroot_symlinks
if [ "${LIVE_SYMLINKS}" = "enabled" ] if [ "${LIVE_SYMLINKS}" = "enabled" ]
then then
if [ -f "${LIVE_CHROOT}"/usr/bin/symlinks ] if [ -f chroot/usr/bin/symlinks ]
then then
SYMLINKS="true" SYMLINKS="true"
fi fi
@ -38,7 +38,7 @@ then
then then
# Installing symlinks # Installing symlinks
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
Chroot "apt-get install --yes symlinks" Chroot "apt-get install --yes symlinks"
;; ;;
@ -55,7 +55,7 @@ then
then then
# Removing symlinks # Removing symlinks
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
Chroot "apt-get remove --purge --yes symlinks" Chroot "apt-get remove --purge --yes symlinks"
;; ;;
@ -66,5 +66,5 @@ then
fi fi
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/chroot_symlinks Create_stagefile .stage/chroot_symlinks
fi fi

View File

@ -16,39 +16,39 @@ Read_conffile config/chroot
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
case "${1}" in case "${1}" in
install) install)
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/chroot_sysfs Check_stagefile .stage/chroot_sysfs
if [ ! -d "${LIVE_CHROOT}"/sys ] if [ ! -d chroot/sys ]
then then
# Create mountpoint # Create mountpoint
mkdir -p "${LIVE_CHROOT}"/sys mkdir -p chroot/sys
fi fi
# Mounting /sys # Mounting /sys
mount sys-live -t sysfs "${LIVE_CHROOT}"/sys mount sys-live -t sysfs chroot/sys
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/chroot_sysfs Create_stagefile .stage/chroot_sysfs
;; ;;
remove) remove)
# Unmounting /sys # Unmounting /sys
#fuser -km "${LIVE_CHROOT}"/sys #fuser -km chroot/sys
umount "${LIVE_CHROOT}"/sys > /dev/null 2>&1 umount chroot/sys > /dev/null 2>&1
# Removing stage file # Removing stage file
rm -f "${LIVE_ROOT}"/.stage/chroot_sysfs rm -f .stage/chroot_sysfs
;; ;;
*) *)

View File

@ -16,21 +16,21 @@ Read_conffile config/chroot
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/chroot_sysvinit Check_stagefile .stage/chroot_sysvinit
if [ "${LIVE_SYSVINIT}" = "enabled" ] if [ "${LIVE_SYSVINIT}" = "enabled" ]
then then
# Disable all # Disable all
for FILE in "${LIVE_CHROOT}"/etc/init.d/* for FILE in chroot/etc/init.d/*
do do
Chroot "update-rc.d -f `basename ${FILE}` remove" Chroot "update-rc.d -f `basename ${FILE}` remove"
done done
@ -38,7 +38,7 @@ then
# Re-enable all required (taken from -f standard chroot) # Re-enable all required (taken from -f standard chroot)
for PACKAGE in casper console-common cron dpkg ifupdown initscripts kbd klogd libc6 libdevmapper1.02 libselinux1 libsepol1 login makedev module-init-tools netbase openbsd-inetd procps sudo sysklogd udev util-linux for PACKAGE in casper console-common cron dpkg ifupdown initscripts kbd klogd libc6 libdevmapper1.02 libselinux1 libsepol1 login makedev module-init-tools netbase openbsd-inetd procps sudo sysklogd udev util-linux
do do
if [ -f "${LIVE_CHROOT}"/var/lib/dpkg/info/${PACKAGE}.postinst ] if [ -f chroot/var/lib/dpkg/info/${PACKAGE}.postinst ]
then then
# Re-configure if existing # Re-configure if existing
Chroot "/var/lib/dpkg/info/${PACKAGE}.postinst configure" Chroot "/var/lib/dpkg/info/${PACKAGE}.postinst configure"
@ -46,5 +46,5 @@ then
done done
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/chroot_sysvinit Create_stagefile .stage/chroot_sysvinit
fi fi

View File

@ -16,27 +16,27 @@ Read_conffile config/chroot
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
case "${1}" in case "${1}" in
install) install)
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/chroot_sysvrc Check_stagefile .stage/chroot_sysvrc
if [ -f "${LIVE_CHROOT}"/usr/sbin/policy-rc.d ] if [ -f chroot/usr/sbin/policy-rc.d ]
then then
# Save policy-rc.d file # Save policy-rc.d file
mv "${LIVE_CHROOT}"/usr/sbin/policy-rc.d "${LIVE_CHROOT}"/usr/sbin/policy-rc.d.orig mv chroot/usr/sbin/policy-rc.d chroot/usr/sbin/policy-rc.d.orig
fi fi
# Create policy-rc.d file # Create policy-rc.d file
cat > "${LIVE_CHROOT}"/usr/sbin/policy-rc.d << EOF cat > chroot/usr/sbin/policy-rc.d << EOF
#!/bin/sh #!/bin/sh
echo echo
@ -45,24 +45,24 @@ echo "Warning: invoke-rc.d policy in action. Skiping daemon starting"
exit 101 exit 101
EOF EOF
chmod 0755 "${LIVE_CHROOT}"/usr/sbin/policy-rc.d chmod 0755 chroot/usr/sbin/policy-rc.d
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/chroot_sysvrc Create_stagefile .stage/chroot_sysvrc
;; ;;
remove) remove)
if [ -f "${LIVE_CHROOT}"/usr/sbin/policy-rc.d.orig ] if [ -f chroot/usr/sbin/policy-rc.d.orig ]
then then
# Restore policy-rc.d file # Restore policy-rc.d file
mv "${LIVE_CHROOT}"/usr/sbin/policy-rc.d.orig "${LIVE_CHROOT}"/usr/sbin/policy-rc.d mv chroot/usr/sbin/policy-rc.d.orig chroot/usr/sbin/policy-rc.d
else else
# Remove policy-rc.d file # Remove policy-rc.d file
rm -f "${LIVE_CHROOT}"/usr/sbin/policy-rc.d rm -f chroot/usr/sbin/policy-rc.d
fi fi
# Removing stage file # Removing stage file
rm -f "${LIVE_ROOT}"/.stage/chroot_sysvrc rm -f .stage/chroot_sysvrc
;; ;;
*) *)

View File

@ -16,23 +16,23 @@ Read_conffile config/chroot
Set_defaults Set_defaults
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/chroot_tasks Check_stagefile .stage/chroot_tasks
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
if [ -n "${LIVE_TASKS}" ] && [ "${LH_APT}" = "aptitude" ] if [ -n "${LIVE_TASKS}" ] && [ "${LH_APT}" = "aptitude" ]
then then
# Restore old cache # Restore old cache
if [ -d "${LIVE_ROOT}"/cache/chroot_tasks ] if [ -d cache/chroot_tasks ]
then then
cp "${LIVE_ROOT}"/cache/chroot_tasks/*.deb "${LIVE_CHROOT}"/var/cache/apt/archives cp cache/chroot_tasks/*.deb chroot/var/cache/apt/archives
fi fi
Chroot "aptitude install --assume-yes ${LIVE_TASKS}" Chroot "aptitude install --assume-yes ${LIVE_TASKS}"
@ -40,16 +40,16 @@ then
# Saving new cache # Saving new cache
Chroot "apt-get autoclean" Chroot "apt-get autoclean"
if ls "${LIVE_CHROOT}"/var/cache/apt/archives/*.deb &> /dev/null if ls chroot/var/cache/apt/archives/*.deb &> /dev/null
then then
if [ ! -d "${LIVE_ROOT}"/cache/chroot_tasks ] if [ ! -d cache/chroot_tasks ]
then then
mkdir -p "${LIVE_ROOT}"/cache/chroot_tasks mkdir -p cache/chroot_tasks
fi fi
mv -f "${LIVE_CHROOT}"/var/cache/apt/archives/*.deb "${LIVE_ROOT}"/cache/chroot_tasks mv -f chroot/var/cache/apt/archives/*.deb cache/chroot_tasks
fi fi
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/chroot_tasks Create_stagefile .stage/chroot_tasks
fi fi

View File

@ -26,43 +26,44 @@ case "${1}" in
;; ;;
cache) cache)
rm -rf "${LIVE_ROOT}"/cache rm -rf cache
;; ;;
chroot) chroot)
umount -f "${LIVE_CHROOT}"/sys > /dev/null 2>&1 || true umount -f chroot/sys > /dev/null 2>&1 || true
umount -f "${LIVE_CHROOT}"/proc > /dev/null 2>&1 || true umount -f chroot/proc > /dev/null 2>&1 || true
umount -f "${LIVE_CHROOT}"/lib/init/rw > /dev/null 2>&1 || true umount -f chroot/lib/init/rw > /dev/null 2>&1 || true
umount -f "${LIVE_CHROOT}"/dev/shm > /dev/null 2>&1 || true umount -f chroot/dev/shm > /dev/null 2>&1 || true
umount -f "${LIVE_CHROOT}"/dev/pts > /dev/null 2>&1 || true umount -f chroot/dev/pts > /dev/null 2>&1 || true
umount -f "${LIVE_CHROOT}"/dev > /dev/null 2>&1 || true umount -f chroot/dev > /dev/null 2>&1 || true
rm -rf "${LIVE_CHROOT}" rm -rf chroot
;; ;;
binary) binary)
rm -rf "${LIVE_ROOT}"/binary rm -rf binary
rm -f "${LIVE_ROOT}"/binary.iso rm -f binary.iso
rm -f "${LIVE_ROOT}"/binary.img rm -f binary.img
rm -f "${LIVE_ROOT}"/binary.tar.gz rm -f binary*.tar.gz
rm -f packages.txt
rm -f "${LIVE_ROOT}"/.stage/binary* rm -f .stage/binary*
;; ;;
stage) stage)
rm -rf "${LIVE_ROOT}"/.stage rm -rf .stage
rm -f "${LIVE_ROOT}"/.lock rm -f .lock
;; ;;
source) source)
rm -rf "${LIVE_ROOT}"/source rm -rf source
rm -f "${LIVE_ROOT}"/source.iso rm -f source.iso
rm -f "${LIVE_ROOT}"/source.img rm -f source.img
rm -f "${LIVE_ROOT}"/source.tar.gz rm -f source*.tar.gz
rm -f "${LIVE_ROOT}"/.stage/source* rm -f .stage/source*
;; ;;
*) *)

View File

@ -10,6 +10,16 @@ do
. ${FUNCTION} . ${FUNCTION}
done done
if [ "${1}" != "newconfig" ]
then
# Source existing configuration
Read_conffile "${LIVE_ROOT}"/config/common
Read_conffile "${LIVE_ROOT}"/config/bootstrap
Read_conffile "${LIVE_ROOT}"/config/chroot
Read_conffile "${LIVE_ROOT}"/config/image
fi
# Setting defaults
Set_defaults Set_defaults
# Creating configuration directory # Creating configuration directory
@ -47,7 +57,7 @@ LH_APT_RECOMMENDS="${LH_APT_RECOMMENDS}"
# (Default: ${LH_BOOTSTRAP}) # (Default: ${LH_BOOTSTRAP})
LH_BOOTSTRAP="${LH_BOOTSTRAP}" LH_BOOTSTRAP="${LH_BOOTSTRAP}"
# \$LH_CACHE: enable cache # \$LH_CACHE: control if downloaded packages should be cached
# (Default: ${LH_CACHE}) # (Default: ${LH_CACHE})
LH_CACHE="${LH_CACHE}" LH_CACHE="${LH_CACHE}"
@ -63,13 +73,13 @@ LH_DEBCONF_PRIORITY="${LH_DEBCONF_PRIORITY}"
# (Default: autodetected) # (Default: autodetected)
LH_GENISOIMAGE="${LH_GENISOIMAGE}" LH_GENISOIMAGE="${LH_GENISOIMAGE}"
# \$LIVE_ROOT: set the root directory # \$LH_LOSETUP: set the losetup program
# (Default: \`pwd\`/debian-live) # (Default: autodetected)
LIVE_ROOT="${LIVE_ROOT}" LH_LOSETUP="${LH_LOSETUP}"
# \$LIVE_CHROOT: set the chroot directory # \$LIVE_ROOT: set the root directory
# (Default: \${LIVE_ROOT}/chroot) # (Default: ${LIVE_ROOT})
LIVE_CHROOT="${LIVE_CHROOT}" LIVE_ROOT="${LIVE_ROOT}"
EOF EOF
# Creating lh_chroot_* configuration # Creating lh_chroot_* configuration
@ -139,13 +149,13 @@ LIVE_DISTRIBUTION_CONFIG="${LIVE_DISTRIBUTION_CONFIG}"
# (Default: ${LIVE_FLAVOUR}) # (Default: ${LIVE_FLAVOUR})
LIVE_FLAVOUR="${LIVE_FLAVOUR}" LIVE_FLAVOUR="${LIVE_FLAVOUR}"
# \$LIVE_MIRROR: set the mirror to use # \$LIVE_MIRROR_LOCAL: set the local mirror to use
# (Default: ${LIVE_MIRROR}) # (Default: ${LIVE_MIRROR_LOCAL})
LIVE_MIRROR="${LIVE_MIRROR}" LIVE_MIRROR_LOCAL="${LIVE_MIRROR_LOCAL}"
# \$LIVE_MIRROR_SECURITY: set the security mirror to use # \$LIVE_MIRROR_LOCAL_SECURITY: set the local security mirror to use
# (Default: ${LIVE_MIRROR_SECURITY}) # (Default: ${LIVE_MIRROR_LOCAL_SECURITY})
LIVE_MIRROR_SECURITY="${LIVE_MIRROR_SECURITY}" LIVE_MIRROR_LOCAL_SECURITY="${LIVE_MIRROR_LOCAL_SECURITY}"
# \$LIVE_MIRROR_GENERIC: set the generic mirror to use # \$LIVE_MIRROR_GENERIC: set the generic mirror to use
# (Default: ${LIVE_MIRROR_GENERIC}) # (Default: ${LIVE_MIRROR_GENERIC})
@ -155,7 +165,7 @@ LIVE_MIRROR_GENERIC="${LIVE_MIRROR_GENERIC}"
# (Default: ${LIVE_MIRROR_GENERIC_SECURITY}) # (Default: ${LIVE_MIRROR_GENERIC_SECURITY})
LIVE_MIRROR_GENERIC_SECURITY="${LIVE_MIRROR_GENERIC_SECURITY}" LIVE_MIRROR_GENERIC_SECURITY="${LIVE_MIRROR_GENERIC_SECURITY}"
# \$LIVE_SECTIONS: select the section to use # \$LIVE_SECTIONS: select the section(s) to use
# (Default: ${LIVE_SECTIONS}) # (Default: ${LIVE_SECTIONS})
LIVE_SECTIONS="${LIVE_SECTIONS}" LIVE_SECTIONS="${LIVE_SECTIONS}"
EOF EOF

View File

@ -2,9 +2,21 @@
# lh_losetup <device> <file> <partition> # lh_losetup <device> <file> <partition>
set -e
# Source common functions
for FUNCTION in /usr/share/live-helper/functions/*.sh
do
. ${FUNCTION}
done
# Reading configuration files
Read_conffile config/common
Set_defaults
if [ -z "${1}" ] if [ -z "${1}" ]
then then
DEVICE="`losetup -f`" DEVICE="`${LH_LOSETUP} -f`"
else else
DEVICE="${1}" DEVICE="${1}"
fi fi
@ -12,9 +24,9 @@ fi
FILE="${2}" FILE="${2}"
PARTITION="${3}" PARTITION="${3}"
losetup "${DEVICE}" "${FILE}" ${LH_LOSETUP} "${DEVICE}" "${FILE}"
FDISK_OUT="`fdisk -l -u ${DEVICE} 2>&1`" FDISK_OUT="`fdisk -l -u ${DEVICE} 2>&1`"
losetup -d "${DEVICE}" ${LH_LOSETUP} -d "${DEVICE}"
LOOPDEVICE="`echo ${DEVICE}p${PARTITION:=1}`" LOOPDEVICE="`echo ${DEVICE}p${PARTITION:=1}`"
CYL=`echo "$FDISK_OUT" | sed -ne "s_^$LOOPDEVICE[ *]*\([0-9]*\).*_\1_p"` CYL=`echo "$FDISK_OUT" | sed -ne "s_^$LOOPDEVICE[ *]*\([0-9]*\).*_\1_p"`
@ -25,7 +37,7 @@ echo loop $DEVICE at offset $OFFSET
if [ "${PARTITION}" = "0" ] if [ "${PARTITION}" = "0" ]
then then
losetup "${DEVICE}" "${FILE}" ${LH_LOSETUP} "${DEVICE}" "${FILE}"
else else
losetup -o "${OFFSET}" "${DEVICE}" "${FILE}" ${LH_LOSETUP} -o "${OFFSET}" "${DEVICE}" "${FILE}"
fi fi

View File

@ -19,6 +19,7 @@ lh_chroot_resolv install
lh_chroot_sources install lh_chroot_sources install
# Preparing images # Preparing images
lh_source_config
lh_source_download lh_source_download
# Building images # Building images
@ -28,6 +29,6 @@ lh_source_net
lh_source_usb lh_source_usb
# Deconfiguring chroot # Deconfiguring chroot
rm -f "${LIVE_ROOT}"/.stage/chroot_sources rm -f .stage/chroot_sources
lh_chroot_resolv remove lh_chroot_resolv remove
lh_chroot_hosts remove lh_chroot_hosts remove

52
helpers/lh_source_config Executable file
View File

@ -0,0 +1,52 @@
#!/bin/sh
# lh_source_config(1) - copies debian-live config into source
set -e
# Source common functions
for FUNCTION in /usr/share/live-helper/functions/*.sh
do
. ${FUNCTION}
done
# Reading configuration files
Read_conffile config/common
Read_conffile config/image
Set_defaults
if [ "${LIVE_SOURCE}" = "enabled" ]
then
# Requiring stage file
Require_stagefile .stage/bootstrap
# Checking lock file
Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
# Checking stage file
Check_stagefile .stage/source_config
# Remove old sources
if [ -d source/debian-live ]
then
rm -rf source/debian-live
fi
# Copy system configuration
mkdir -p source/debian-live
cp -a config source/debian-live
# Create tarball
cd source
tar cfz debian-live-config_`date +%Y%m%d.%s`.tar.gz debian-live
cd "${OLDPWD}"
rm -rf source/debian-live/config
mv source/debian-live-config_*.tar.gz source/debian-live
# Creating stage file
Create_stagefile .stage/source_config
fi

View File

@ -18,30 +18,31 @@ Set_defaults
if [ "${LIVE_SOURCE}" = "enabled" ] if [ "${LIVE_SOURCE}" = "enabled" ]
then then
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap Require_stagefile .stage/bootstrap
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/source_download Check_stagefile .stage/source_download
# Remove old sources # Remove old sources
if [ "${LIVE_ROOT}"/source ] if [ -d source/debian ]
then then
rm -rf "${LIVE_ROOT}"/source rm -rf source/debian
fi fi
# Download sources # Download sources
Chroot "dpkg --get-selections" | awk '{ print $1 }' > "${LIVE_CHROOT}"/root/dpkg-selection.txt Chroot "dpkg --get-selections" | awk '{ print $1 }' > chroot/root/dpkg-selection.txt
#echo "live-helper" >> chroot/root/dpkg-selection.txt
Chroot "xargs --arg-file=/root/dpkg-selection.txt apt-get source --download-only" Chroot "xargs --arg-file=/root/dpkg-selection.txt apt-get source --download-only"
rm -f "${LIVE_CHROOT}"/root/dpkg-selection.txt rm -f chroot/root/dpkg-selection.txt
# Sort sources # Sort sources
for DSC in "${LIVE_CHROOT}"/*.dsc for DSC in chroot/*.dsc
do do
SOURCE="`awk '/Source:/ { print $2; }' ${DSC}`" SOURCE="`awk '/Source:/ { print $2; }' ${DSC}`"
@ -53,15 +54,12 @@ then
fi fi
# Install directory # Install directory
install -d -m 0755 "${LIVE_ROOT}"/source/"${LETTER}"/"${SOURCE}" install -d -m 0755 source/debian/"${LETTER}"/"${SOURCE}"
# Move files # Move files
mv "${LIVE_CHROOT}"/"${SOURCE}"_* "${LIVE_ROOT}"/source/"${LETTER}"/"${SOURCE}" mv chroot/"${SOURCE}"_* source/debian/"${LETTER}"/"${SOURCE}"
done done
# Copy system configuration
cp -a "${LIVE_ROOT}"/config "${LIVE_ROOT}"/source
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/source_download Create_stagefile .stage/source_download
fi fi

View File

@ -17,7 +17,6 @@ Set_defaults
if [ "${LIVE_SOURCE}" = "disabled" ] if [ "${LIVE_SOURCE}" = "disabled" ]
then then
echo "W: source images disabled (FIXME)"
exit 0 exit 0
fi fi
@ -26,28 +25,27 @@ do
if [ "${IMAGE}" = "generic" ] if [ "${IMAGE}" = "generic" ]
then then
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/source_download Require_stagefile .stage/source_download
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/source_generic Check_stagefile .stage/source_generic
# Remove old source # Remove old source
if [ -f "${LIVE_ROOT}"/source.tar ] if [ -f source.tar ]
then then
rm -f "${LIVE_ROOT}"/source.tar rm -f source.tar
fi fi
# Create tarball # Create tarball
cd "${LIVE_ROOT}" &&
tar cf source.tar source tar cf source.tar source
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/source_generic Create_stagefile .stage/source_generic
fi fi
done done

51
helpers/lh_source_hdd Executable file
View File

@ -0,0 +1,51 @@
#!/bin/sh
# lh_source_hdd(1) - build source harddisk image
set -e
# Source common functions
for FUNCTION in /usr/share/live-helper/functions/*.sh
do
. ${FUNCTION}
done
# Reading configuration files
Read_conffile config/common
Read_conffile config/image
Set_defaults
if [ "${LIVE_SOURCE}" = "disabled" ]
then
exit 0
fi
for IMAGE in ${LIVE_SOURCE_IMAGE}
do
if [ "${IMAGE}" = "hdd" ]
then
# Requiring stage file
Require_stagefile .stage/source_download
# Checking lock file
Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
# Checking stage file
Check_stagefile .stage/source_hdd
# Remove old source
if [ -f source-hdd.tar.gz ]
then
rm -f source-hdd.tar.gz
fi
# Create tarball
tar cfz source-hdd.tar.gz source
# Creating stage file
Create_stagefile .stage/source_hdd
fi
done

View File

@ -17,7 +17,6 @@ Set_defaults
if [ "${LIVE_SOURCE}" = "disabled" ] if [ "${LIVE_SOURCE}" = "disabled" ]
then then
echo "W: source images disabled (FIXME)"
exit 0 exit 0
fi fi
@ -26,28 +25,27 @@ do
if [ "${IMAGE}" = "iso" ] if [ "${IMAGE}" = "iso" ]
then then
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/source_download Require_stagefile .stage/source_download
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/source_iso Check_stagefile .stage/source_iso
# Remove old source # Remove old source
if [ -f "${LIVE_ROOT}"/source.iso ] if [ -f source.iso ]
then then
rm -f "${LIVE_ROOT}"/source.iso rm -f source.iso
fi fi
# Create image # Create image
cd "${LIVE_ROOT}" &&
${LH_GENISOIMAGE} -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o source.iso -r -J -l -V "${LIVE_DISK_VOLUME}" source ${LH_GENISOIMAGE} -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o source.iso -r -J -l -V "${LIVE_DISK_VOLUME}" source
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/source_iso Create_stagefile .stage/source_iso
fi fi
done done

View File

@ -17,7 +17,6 @@ Set_defaults
if [ "${LIVE_SOURCE}" = "disabled" ] if [ "${LIVE_SOURCE}" = "disabled" ]
then then
echo "W: source images disabled (FIXME)"
exit 0 exit 0
fi fi
@ -26,28 +25,27 @@ do
if [ "${IMAGE}" = "net" ] if [ "${IMAGE}" = "net" ]
then then
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/source_download Require_stagefile .stage/source_download
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/source_net Check_stagefile .stage/source_net
# Remove old source # Remove old source
if [ -f "${LIVE_ROOT}"/source.tar.gz ] if [ -f source-net.tar.gz ]
then then
rm -f "${LIVE_ROOT}"/source.tar.gz rm -f source-net.tar.gz
fi fi
# Create tarball # Create tarball
cd "${LIVE_ROOT}" && tar cfz source-net.tar.gz source
tar cfz source.tar.gz source
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/source_net Create_stagefile .stage/source_net
fi fi
done done

View File

@ -18,7 +18,6 @@ Set_defaults
if [ "${LIVE_SOURCE}" = "disabled" ] if [ "${LIVE_SOURCE}" = "disabled" ]
then then
echo "W: source images disabled (FIXME)"
exit 0 exit 0
fi fi
@ -27,23 +26,23 @@ do
if [ "${IMAGE}" = "usb" ] if [ "${IMAGE}" = "usb" ]
then then
# Requiring stage file # Requiring stage file
Require_stagefile "${LIVE_ROOT}"/.stage/source_download Require_stagefile .stage/source_download
# Checking lock file # Checking lock file
Check_lockfile "${LIVE_ROOT}"/.lock Check_lockfile .lock
# Creating lock file # Creating lock file
Create_lockfile "${LIVE_ROOT}"/.lock Create_lockfile .lock
# Checking stage file # Checking stage file
Check_stagefile "${LIVE_ROOT}"/.stage/source_usb Check_stagefile .stage/source_usb
if [ ! -f "${LIVE_CHROOT}"/sbin/mkdosfs ] if [ ! -f chroot/sbin/mkdosfs ]
then then
PACKAGES="${PACKAGES} dosfstools" PACKAGES="${PACKAGES} dosfstools"
fi fi
if [ ! -f "${LIVE_CHROOT}"/sbin/parted ] if [ ! -f chroot/sbin/parted ]
then then
PACKAGES="${PACKAGES} parted" PACKAGES="${PACKAGES} parted"
fi fi
@ -52,7 +51,7 @@ do
then then
# Installing packages # Installing packages
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
Chroot "apt-get install --yes ${PACKAGES}" Chroot "apt-get install --yes ${PACKAGES}"
;; ;;
@ -63,49 +62,52 @@ do
fi fi
# Remove old source # Remove old source
if [ -f "${LIVE_ROOT}"/source.img ] if [ -f source.img ]
then then
rm -f "${LIVE_ROOT}"/source.img rm -f source.img
fi fi
# Everything which comes here needs to be cleaned up, # Everything which comes here needs to be cleaned up,
DU_DIM="`du -ms ${LIVE_ROOT}/source | cut -f1`" DU_DIM="`du -ms source | cut -f1`"
REAL_DIM="`expr ${DU_DIM} + ${DU_DIM} / 20`" # Just 5% more to be sure, need something more sophistcated here... REAL_DIM="`expr ${DU_DIM} + ${DU_DIM} / 20`" # Just 5% more to be sure, need something more sophistcated here...
dd if=/dev/zero of="${LIVE_ROOT}"/source.img bs=1024k count=${REAL_DIM} dd if=/dev/zero of=source.img bs=1024k count=${REAL_DIM}
FREELO="`losetup -f`" FREELO="`${LH_LOSETUP} -f`"
if [ ! -b "${LIVE_CHROOT}"/${FREELO} ] if [ ! -b chroot/${FREELO} ]
then then
MAKEDEV="true" MAKEDEV="true"
Chroot "cd /dev && ./MAKEDEV ${FREELO}"
mv chroot/dev chroot/dev.tmp
find /dev | cpio -dmpu chroot
fi fi
echo "!!! The following error/warning messages can be ignored !!!" echo "!!! The following error/warning messages can be ignored !!!"
lh_losetup $FREELO "${LIVE_ROOT}"/source.img 0 lh_losetup $FREELO source.img 0
Chroot "parted -s ${FREELO} mklabel msdos" || true Chroot "parted -s ${FREELO} mklabel msdos" || true
Chroot "parted -s ${FREELO} mkpartfs primary fat16 0.0 100%" || true Chroot "parted -s ${FREELO} mkpartfs primary fat16 0.0 100%" || true
Chroot "parted -s ${FREELO} set 1 lba off" || true Chroot "parted -s ${FREELO} set 1 lba off" || true
losetup -d ${FREELO} ${LH_LOSETUP} -d ${FREELO}
lh_losetup $FREELO "${LIVE_ROOT}"/source.img 1 lh_losetup $FREELO source.img 1
Chroot "mkfs.msdos -n DEBIAN_LIVE ${FREELO}" Chroot "mkfs.msdos -n DEBIAN_LIVE ${FREELO}"
mkdir -p "${LIVE_ROOT}"/source.tmp mkdir -p source.tmp
mount ${FREELO} "${LIVE_ROOT}"/source.tmp mount ${FREELO} source.tmp
cp -r "${LIVE_ROOT}"/source/* "${LIVE_ROOT}"/source.tmp cp -r source/* source.tmp
umount "${LIVE_ROOT}"/source.tmp umount source.tmp
rmdir "${LIVE_ROOT}"/source.tmp rmdir source.tmp
losetup -d ${FREELO} ${LH_LOSETUP} -d ${FREELO}
echo "!!! The above error/warning messages can be ignored !!!" echo "!!! The above error/warning messages can be ignored !!!"
if [ -n "${MAKEDEV}" ] if [ -n "${MAKEDEV}" ]
then then
rm -f "${LIVE_CHROOT}"/${FREELO} rm -f chroot/dev
mv chroot/dev.tmp chroot/dev
fi fi
if [ -n "${PACKAGES}" ] if [ -n "${PACKAGES}" ]
then then
# Removing packages # Removing packages
case "${LH_APT}" in case "${LH_APT}" in
apt) apt|apt-get)
Chroot "apt-get remove --purge --yes ${PACKAGES}" Chroot "apt-get remove --purge --yes ${PACKAGES}"
;; ;;
@ -116,6 +118,6 @@ do
fi fi
# Creating stage file # Creating stage file
Create_stagefile "${LIVE_ROOT}"/.stage/source_usb Create_stagefile .stage/source_usb
fi fi
done done

View File

@ -4,6 +4,7 @@ set -e
# Set static variables # Set static variables
PROGRAM="`basename ${0}`" PROGRAM="`basename ${0}`"
DESCRIPTION="utility to build Debian Live systems"
# Source common functions # Source common functions
for FUNCTION in /usr/share/live-helper/functions/*.sh for FUNCTION in /usr/share/live-helper/functions/*.sh
@ -11,67 +12,21 @@ do
. ${FUNCTION} . ${FUNCTION}
done done
USAGE="Usage: ${PROGRAM} build|config [--apt apt|aptitude] [--apt-ftpproxy URL] [--apt-httpproxy URL] [--apt-generic enabled|disabled] [--apt-pdiffs enabled|disabled] [--apt-recommends enabled|disabled] [--bootstrap cdebootstrap|deboostrap] [--cache enabled|disabled] [--debconf-frontend dialog|readline|noninteractive] [--debconf-priority low|medium|high|critical] [--genisoimage genisoimage|mkisofs] [--root DIRECTORY] [--chroot DIRECTORY] [-a|--architecture ARCHITECTURE] [-d|--distribution testing|unstable|etch|sid] [--distribution-config DIRECTORY] [-f|--flavour minimal|standard] [-m|--mirror URL] [--mirror-security URL] [--mirror-generic URL] [--mirror-generic-security URL] [--sections SECTION|\"SECTIONS\"] [-k|--kernel KERNEL] [--kernel-packages PACKAGES] [-l|--language LANGUAGE] [--packages PACKAGE|\"PACKAGES\"] [-p|--packages-list LIST] [--tasks TASK|\"TASKS\"] [--security enabled|disabled] [--symlinks enabled|disabled] [--sysvinit enabled|disabled] [--bootappend KERNEL_PARAMETER|\"KERNEL_PARAMETERS\"] [-e|--encryption ALGORITHM] [--filesystem ext2|plain|squashfs] [--memtest86 enabled|disabled] [--iso-volume STRING] [--server-address HOSTNAME|IP] [--server-path DIRECTORY] [--source enabled|disabled] [--syslinux enabled|disabled] [--syslinux-splash FILE] [-b|--binary-image iso|usb|net] [-s|--source-image generic|iso|usb|net] [--templates DIRECTORY]" Set_defaults
Help () # Source existing configuration
{ Read_conffile debian-live/config/common
echo "${PROGRAM} - utility to build Debian Live systems" Read_conffile debian-live/config/bootstrap
echo Read_conffile debian-live/config/chroot
echo "${USAGE}" Read_conffile debian-live/config/image
echo "Usage: ${PROGRAM} [-h|--help]"
echo "Usage: ${PROGRAM} [-u|--usage]"
echo "Usage: ${PROGRAM} [-v|--version]"
echo
echo "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"
echo
echo "Report bugs to Debian Live project <http://debian-live.alioth.debian.org/>."
exit 0
}
Usage () USAGE="Usage: ${PROGRAM} [config] [--apt apt|aptitude] [--apt-ftpproxy URL] [--apt-httpproxy URL] [--apt-generic enabled|disabled] [--apt-pdiffs enabled|disabled] [--apt-recommends 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] [--root DIRECTORY] [-a|--architecture ARCHITECTURE] [-d|--distribution testing|unstable|etch|sid] [--distribution-config DIRECTORY] [-f|--flavour minimal|standard] [-m|--mirror-local URL] [--mirror-local-security URL] [--mirror-generic URL] [--mirror-generic-security URL] [--sections SECTION|\"SECTIONS\"] [-k|--kernel KERNEL] [--kernel-packages PACKAGES] [-l|--language LANGUAGE] [--packages PACKAGE|\"PACKAGES\"] [-p|--packages-list LIST] [--tasks TASK|\"TASKS\"] [--security enabled|disabled] [--symlinks enabled|disabled] [--sysvinit enabled|disabled] [--bootappend KERNEL_PARAMETER|\"KERNEL_PARAMETERS\"] [-e|--encryption ALGORITHM] [--filesystem ext2|plain|squashfs] [--memtest86 enabled|disabled] [--iso-volume STRING] [--server-address HOSTNAME|IP] [--server-path DIRECTORY] [--source enabled|disabled] [--syslinux enabled|disabled] [--syslinux-splash FILE] [-b|--binary-image hdd|iso|usb|net] [-s|--source-image generic|hdd|iso|usb|net] [--templates DIRECTORY]"
{
echo "${PROGRAM} - utility to build Debian Live systems"
echo
echo "${USAGE}"
echo "Usage: ${PROGRAM} [-h|--help]"
echo "Usage: ${PROGRAM} [-u|--usage]"
echo "Usage: ${PROGRAM} [-v|--version]"
echo
echo "Try \"${PROGRAM} --help\" for more information."
exit ${1}
}
Version () 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"
{
echo "${PROGRAM}, version ${VERSION}"
echo
echo "Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org>"
echo "Copyright (C) 2006-2007 Marco Amadori <marco.amadori@gmail.com>"
echo
echo "This program is free software; you can redistribute it and/or modify"
echo "it under the terms of the GNU General Public License as published by"
echo "the Free Software Foundation; either version 2 of the License, or"
echo "(at your option) any later version."
echo
echo "This program is distributed in the hope that it will be useful,"
echo "but WITHOUT ANY WARRANTY; without even the implied warranty of"
echo "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the"
echo "GNU General Public License for more details."
echo
echo "You should have received a copy of the GNU General Public License"
echo "along with this program; if not, write to the Free Software"
echo "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA"
echo
echo "On Debian systems, the complete text of the GNU General Public License"
echo "can be found in /usr/share/common-licenses/GPL file."
echo
echo "Homepage: <http://debian-live.alioth.debian.org/>"
exit 0
}
Main () Main ()
{ {
ARGUMENTS="`getopt --longoptions build,config,apt:,apt-ftpproxy:,apt-httpprox:,apt-generic:,apt-pdiffs:,apt-recommends:,bootstrap:,cache:,debconf-frontend:,debconf-priority:,genisoimage:,root:,chroot:,architecture:,distribution:,distribution-config:,flavour:,mirror:,mirror-security:,mirror-generic:,mirror-generic-security:,sections:,kernel:,kernel-packages:,language:,packages:,packages-list:,tasks:,security:,symlinks:,sysvinit:,bootappend:,encryption:,filesystem:,memtest86:,iso-volume:,server-address:,server-path:,source:,syslinux:,syslinux-splash:,binary-image:,binary-source:,templates:,help,usage,version --name=${PROGRAM} --options a:d:f:m:k:l:p:e:b:s:huv --shell sh -- "${@}"`" ARGUMENTS="`getopt --longoptions apt:,apt-ftpproxy:,apt-httpproxy:,apt-generic:,apt-pdiffs:,apt-recommends:,bootstrap:,cache:,debconf-frontend:,debconf-priority:,genisoimage:,losetup:,root:,architecture:,distribution:,distribution-config:,flavour:,mirror:,mirror-security:,mirror-generic:,mirror-generic-security:,sections:,kernel:,kernel-packages:,language:,packages:,packages-list:,tasks:,security:,symlinks:,sysvinit:,bootappend:,encryption:,filesystem:,memtest86:,iso-volume:,server-address:,server-path:,source:,syslinux:,syslinux-splash:,binary-image:,binary-source:,templates:,help,usage,version --name=${PROGRAM} --options a:d:f:m:k:l:p:e:b:s:huv --shell sh -- "${@}"`"
if [ "${?}" != "0" ] if [ "${?}" != "0" ]
then then
@ -79,20 +34,10 @@ Main ()
exit 1 exit 1
fi fi
case "${1}" in if [ "${1}" = "config" ]
config) then
CONFIG="true" CONFIG="true"
;; fi
build)
BUILD="true"
;;
*)
echo "E: no operation (config|build) specified."
exit 1
;;
esac
eval set -- "${ARGUMENTS}" eval set -- "${ARGUMENTS}"
@ -144,12 +89,12 @@ Main ()
LH_GENISOIMAGE="${2}"; shift 2 LH_GENISOIMAGE="${2}"; shift 2
;; ;;
--root) --losetup)
LIVE_ROOT="${2}"; shift 2 LH_LOSETUP="${2}"; shift 2
;; ;;
--chroot) --root)
LIVE_CHROOT="${2}"; shift 2 LIVE_ROOT="${2}"; shift 2
;; ;;
# bootstrap # bootstrap
@ -170,12 +115,12 @@ Main ()
LIVE_FLAVOUR="${2}"; shift 2 LIVE_FLAVOUR="${2}"; shift 2
;; ;;
-m|--mirror) -m|--mirror-local)
LIVE_MIRROR="${2}"; shift 2 LIVE_MIRROR_LOCAL="${2}"; shift 2
;; ;;
--mirror-security) --mirror-local-security)
LIVE_MIRROR_SECURITY="${2}"; shift 2 LIVE_MIRROR_LOCAL_SECURITY="${2}"; shift 2
;; ;;
--mirror-generic) --mirror-generic)
@ -306,16 +251,12 @@ Main ()
# Initializing # Initializing
lh_testroot lh_testroot
Set_defaults
# Configuring (this is really shit!) # Configuring (this is really shit!)
if [ "${CONFIG}" = "true" ] 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_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_FLAVOUR="${LIVE_FLAVOUR}" LIVE_MIRROR_LOCAL="${LIVE_MIRROR_LOCAL}" LIVE_MIRROR_LOCAL_SECURITY="${LIVE_MIRROR_LOCAL_SECURITY}" LIVE_MIRROR_GENERIC="${LIVE_MIRROR_GENERIC}" LIVE_MIRROR_GENERIC_SECURITY="${LIVE_MIRROR_GENERIC_SECURITY}" LIVE_SECTIONS="${LIVE_SECTIONS}" LIVE_KERNEL="${LIVE_KERNEL}" LIVE_KERNEL_PACKAGES="${LIVE_KERNEL_PACKAGES}" LIVE_LANGUAGE="${LIVE_LANGUAGE}" LIVE_PACKAGES="${LIVE_PACKAGES}" LIVE_PACKAGES_LIST="${LIVE_PACKAGES_LIST}" 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_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_SYSLINUX="${LIVE_SYSLINUX}" LIVE_SYSLINUX_SPLASH="${LIVE_SYSLINUX_SPLASH}" LIVE_BINARY_IMAGE="${LIVE_BINARY_IMAGE}" LIVE_SOURCE_IMAGE="${LIVE_SOURCE_IMAGE}" LIVE_TEMPLATES="${LIVE_TEMPLATES}" lh_config newconfig
then
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_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_CHROOT="${LIVE_CHROOT}" LIVE_ARCHITECTURE="${LIVE_ARCHITECTURE}" LIVE_DISTRIBUTION="${LIVE_DISTRIBUTION}" LIVE_DISTRIBUTION_CONFIG="${LIVE_DISTRIBUTION_CONFIG}" LIVE_FLAVOUR="${LIVE_FLAVOUR}" LIVE_MIRROR="${LIVE_MIRROR}" LIVE_MIRROR_SECURITY="${LIVE_MIRROR_SECURITY}" LIVE_MIRROR_GENERIC="${LIVE_MIRROR_GENERIC}" LIVE_MIRROR_GENERIC_SECURITY="${LIVE_MIRROR_GENERIC_SECURITY}" LIVE_SECTIONS="${LIVE_SECTIONS}" LIVE_KERNEL="${LIVE_KERNEL}" LIVE_KERNEL_PACKAGES="${LIVE_KERNEL_PACKAGES}" LIVE_LANGUAGE="${LIVE_LANGUAGE}" LIVE_PACKAGES="${LIVE_PACKAGES}" LIVE_PACKAGES_LIST="${LIVE_PACKAGES_LIST}" 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_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_SYSLINUX="${LIVE_SYSLINUX}" LIVE_SYSLINUX_SPLASH="${LIVE_SYSLINUX_SPLASH}" LIVE_BINARY_IMAGE="${LIVE_BINARY_IMAGE}" LIVE_SOURCE_IMAGE="${LIVE_SOURCE_IMAGE}" LIVE_TEMPLATES="${LIVE_TEMPLATES}" lh_config
fi
# Building # Building
if [ "${BUILD}" = "true" ] if [ -z "${CONFIG}" ]
then then
cd "${LIVE_ROOT}" && lh_build cd "${LIVE_ROOT}" && lh_build
fi fi

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

56
manpages/lh_binary.1 Normal file
View File

@ -0,0 +1,56 @@
.TH LH_BINARY 1 "2007\-03\-19" "1.0~a2" "live\-helper"
.SH NAME
lh_binary \- meta-helper for lh_binary_*
.SH SYNOPSIS
.B lh_binary [\fIlive\-helper\ options\fR\|]
.SH DESCRIPTION
lh_binary is a meta-helper. It calls all necessary helpers to complete the binary stage.
.SH OPTIONS
lh_bootstrap has no options (FIXME).
.SH BINARY HELPERS
Here is the complete list of available binary helper commands. See their man pages for additional documentation.
.IP "\fIlh_binary_encryption\fR(1)" 4
encrypts the root filesystem.
.IP "\fIlh_binary_includes\fR(1)" 4
copies files into the binary image.
.IP "\fIlh_binary_hdd\fR(1)" 4
creates the harddisk binary tarball.
.IP "\fIlh_binary_iso\fR(1)" 4
creates the CD/DVD binary image.
.IP "\fIlh_binary_linuximage\fR(1)" 4
copies linux-image into the binary image.
.IP "\fIlh_binary_localincludes\fR(1)" 4
copies local files into the binary image.
.IP "\fIlh_binary_manifest\fR(1)" 4
creates the package list of the root filesystem.
.IP "\fIlh_binary_md5sum\fR(1)" 4
creates md5sum.txt in the binary image.
.IP "\fIlh_binary_memtest86\fR(1)" 4
copies memtest86 into the binary image.
.IP "\fIlh_binary_net\fR(1)" 4
creates the netboot binary tarball.
.IP "\fIlh_binary_rootfs\fR(1)" 4
creates the root filesystem.
.IP "\fIlh_binary_syslinux\fR(1)" 4
copies syslinux into the binary image.
.IP "\fIlh_binary_usb\fR(1)" 4
creates the USB binary image.
.SH SEE ALSO
\fIlive\-helper\fR(7)
.PP
This program is a part of live-helper.
.SH BUGS
Report bugs against live\-helper <\fIhttp://packages.qa.debian.org/live\-helper/\fR>.
.SH HOMEPAGE
More information about the Debian Live project can be found at <\fIhttp://debian\-live.alioth.debian.org/\fR> and <\fIhttp://wiki.debian.org/DebianLive/\fR>.
.SH AUTHOR
live\-helper was written by Daniel Baumann <\fIdaniel@debian.org\fR> and Marco Amadori <\fImarco.amadori@gmail.com\fR>, for the Debian project.

42
manpages/lh_bootstrap.1 Normal file
View File

@ -0,0 +1,42 @@
.TH LH_BOOTSTRAP 1 "2007\-03\-19" "1.0~a2" "live\-helper"
.SH NAME
lh_bootstrap \- meta-helper for lh_bootstrap_*
.SH SYNOPSIS
.B lh_bootstrap [\fIlive\-helper\ options\fR\|]
.SH DESCRIPTION
lh_bootstrap is a meta-helper. It calls all necessary helpers to complete the bootstrap stage.
.SH CONFIGURATION FILE
lh_bootstrap reads config/common if available. See ENVIRONMENT for the correct environment variables to use.
.SH ENVIRONMENT
lh_bootstrap respects the following environment variables if available, otherwise uses default values for it.
.IP "\fI$LH_BOOTSTRAP\fR" 4
select the bootstrap program (Default: cdebootstrap)
.SH OPTIONS
lh_bootstrap has no options (FIXME).
.SH BOOTSTRAP HELPERS
Here is the complete list of available bootstrap helper commands. See their man pages for additional documentation.
.IP "\fIlh_bootstrap_cdebootstrap\fR(1)" 4
bootstraps system with cdebootstrap.
.IP "\fIlh_bootstrap_debootstrap\fR(1)" 4
bootstraps system with debootstrap.
.SH SEE ALSO
\fIlive\-helper\fR(7)
.PP
This program is a part of live-helper.
.SH BUGS
Report bugs against live\-helper <\fIhttp://packages.qa.debian.org/live\-helper/\fR>.
.SH HOMEPAGE
More information about the Debian Live project can be found at <\fIhttp://debian\-live.alioth.debian.org/\fR> and <\fIhttp://wiki.debian.org/DebianLive/\fR>.
.SH AUTHOR
live\-helper was written by Daniel Baumann <\fIdaniel@debian.org\fR> and Marco Amadori <\fImarco.amadori@gmail.com\fR>, for the Debian project.

View File

@ -0,0 +1,49 @@
.TH LH_BOOTSTRAP_CDEBOOTSTRAP 1 "2007\-03\-19" "1.0~a2" "live\-helper"
.SH NAME
lh_bootstrap_cdebootstrap \- bootstrap a Debian system with \fIcdebootstrap\fR(1)
.SH SYNOPSIS
.B lh_bootstrap_cdebootstrap [\fIlive\-helper\ options\fR\|]
.SH DESCRIPTION
lh_bootstrap_cdebootstrap uses \fIcdebootstrap\fR(1) to create a Debian base system from scratch.
.SH CONFIGURATION FILE
lh_bootstrap_cdebootstrap reads config/common and config/bootstrap if available. See ENVIRONMENT for the correct environment variables to use.
.SH ENVIRONMENT
lh_bootstrap_cdebootstrap respects the following environment variables if available, otherwise uses default values for it.
.IP "\fI$LH_CACHE\fR" 4
control if downloaded packages should be cached (Default: enabled)
.IP "\fI$LH_ROOT\fR" 4
set the root directory (Default: debian-live)
.IP "\fI$LIVE_ARCHITECTURE\fR" 4
select the chroot architecture (Default: autodetected)
.IP "\fI$LIVE_DISTRIBUTION\fR" 4
select the distribution to use (Default: sid)
.IP "\fI$LIVE_DISTRIBUTION_CONFIG\fR" 4
set distribution config directory (Default: empty)
.IP "\fI$LIVE_FLAVOUR\fR" 4
select the flavour to use (Default: standard)
.IP "\fI$LIVE_MIRROR_LOCAL\fR" 4
set the local mirror to use (Default: http://ftp.debian.org/debian/)
.SH OPTIONS
lh_bootstrap_cdebootstrap has no options (FIXME).
.SH SEE ALSO
\fIcdebootstrap\fR(1)
.PP
\fIlive\-helper\fR(7)
.PP
This program is a part of live-helper.
.SH BUGS
Report bugs against live\-helper <\fIhttp://packages.qa.debian.org/live\-helper/\fR>.
.SH HOMEPAGE
More information about the Debian Live project can be found at <\fIhttp://debian\-live.alioth.debian.org/\fR> and <\fIhttp://wiki.debian.org/DebianLive/\fR>.
.SH AUTHOR
live\-helper was written by Daniel Baumann <\fIdaniel@debian.org\fR> and Marco Amadori <\fImarco.amadori@gmail.com\fR>, for the Debian project.

View File

@ -0,0 +1,49 @@
.TH LH_BOOTSTRAP_DEBOOTSTRAP 1 "2007\-03\-19" "1.0~a2" "live\-helper"
.SH NAME
lh_bootstrap_debootstrap \- bootstrap a Debian system with \fIdebootstrap\fR(8)
.SH SYNOPSIS
.B lh_bootstrap_debootstrap [\fIlive\-helper\ options\fR\|]
.SH DESCRIPTION
lh_bootstrap_debootstrap uses \fIdebootstrap\fR(8) to create a Debian base system from scratch.
.SH CONFIGURATION FILE
lh_bootstrap_debootstrap reads config/common and config/bootstrap if available. See ENVIRONMENT for the correct environment variables to use.
.SH ENVIRONMENT
lh_bootstrap_debootstrap respects the following environment variables if available, otherwise uses default values for it.
.IP "\fI$LH_CACHE\fR" 4
control if downloaded packages should be cached (Default: enabled)
.IP "\fI$LH_ROOT\fR" 4
set the root directory (Default: debian-live)
.IP "\fI$LIVE_ARCHITECTURE\fR" 4
select the chroot architecture (Default: autodetected)
.IP "\fI$LIVE_DISTRIBUTION\fR" 4
select the distribution to use (Default: sid)
.IP "\fI$LIVE_DISTRIBUTION_CONFIG\fR" 4
set distribution config directory (Default: empty)
.IP "\fI$LIVE_FLAVOUR\fR" 4
select the flavour to use (Default: standard)
.IP "\fI$LIVE_MIRROR_LOCAL\fR" 4
set the local mirror to use (Default: http://ftp.debian.org/debian/)
.SH OPTIONS
lh_bootstrap_debootstrap has no options (FIXME).
.SH SEE ALSO
\fIdebootstrap\fR(8)
.PP
\fIlive\-helper\fR(7)
.PP
This program is a part of live-helper.
.SH BUGS
Report bugs against live\-helper <\fIhttp://packages.qa.debian.org/live\-helper/\fR>.
.SH HOMEPAGE
More information about the Debian Live project can be found at <\fIhttp://debian\-live.alioth.debian.org/\fR> and <\fIhttp://wiki.debian.org/DebianLive/\fR>.
.SH AUTHOR
live\-helper was written by Daniel Baumann <\fIdaniel@debian.org\fR> and Marco Amadori <\fImarco.amadori@gmail.com\fR>, for the Debian project.

27
manpages/lh_clean.1 Normal file
View File

@ -0,0 +1,27 @@
.TH LH_CLEAN 1 "2007\-03\-19" "1.0~a2" "live\-helper"
.SH NAME
lh_clean \- clean up system build directories
.SH SYNOPSIS
.B lh_clean [\fIlive\-helper\ options\fR\|]
.SH DESCRIPTION
lh_clean is a live\-helper program that is responsible for cleaning up after a system is built. It removes the system build directories, and removes some other files including stage files, and any detritus left behind by other live\-helper commands.
.SH OPTIONS
lh_clean has no options (FIXME).
.SH SEE ALSO
\fIlive\-helper\fR(7)
.PP
This program is a part of live-helper.
.SH BUGS
Report bugs against live\-helper <\fIhttp://packages.qa.debian.org/live\-helper/\fR>.
.SH HOMEPAGE
More information about the Debian Live project can be found at <\fIhttp://debian\-live.alioth.debian.org/\fR> and <\fIhttp://wiki.debian.org/DebianLive/\fR>.
.SH AUTHOR
live\-helper was written by Daniel Baumann <\fIdaniel@debian.org\fR> and Marco Amadori <\fImarco.amadori@gmail.com\fR>, for the Debian project.

27
manpages/lh_testroot.1 Normal file
View File

@ -0,0 +1,27 @@
.TH LH_TESTROOT 1 "2007\-03\-19" "1.0~a2" "live\-helper"
.SH NAME
lh_testroot \- ensure that a system is built as root
.SH SYNOPSIS
.B lh_testroot [\fIlive\-helper\ options\fR\|]
.SH DESCRIPTION
lh_testroot simply checks to see if you are root. If not, it exits with an error. Debian Live images must currently be built as real root, \fIfakeroot\fR(1) or \fIsudo\fR(8) does not work.
.SH OPTIONS
lh_testroot has no options (FIXME).
.SH SEE ALSO
\fIlive\-helper\fR(7)
.PP
This program is a part of live-helper.
.SH BUGS
Report bugs against live\-helper <\fIhttp://packages.qa.debian.org/live\-helper/\fR>.
.SH HOMEPAGE
More information about the Debian Live project can be found at <\fIhttp://debian\-live.alioth.debian.org/\fR> and <\fIhttp://wiki.debian.org/DebianLive/\fR>.
.SH AUTHOR
live\-helper was written by Daniel Baumann <\fIdaniel@debian.org\fR> and Marco Amadori <\fImarco.amadori@gmail.com\fR>, for the Debian project.

140
manpages/live-helper.7 Normal file
View File

@ -0,0 +1,140 @@
.TH LIVE\-HELPER 7 "2007\-03\-19" "1.0~a2" "live\-helper"
.SH NAME
live\-helper \- Debian Live helper programs
.SH SYNOPSIS
.B lh_* [\fIlive\-helper\ options\fR\|]
.SH DESCRIPTION
Live\-helper is a collection of programs that can be used to build Debian Live system images. The philosophy behind live\-helper is to provide a collection of small, simple, and easily understood tools that can be used in your own program to automate building of a Live system.
.PP
A typical program that uses live\-helper will call several live\-helper commands in sequence. Live\-helper commands are all named with a "lh_" prefix. Examples of such a program that uses live\-helper is \fImake\-live\fR(1).
.\" .SH CONFIGURATION FILE
.\" live-helper reads debian-live/config/live-helper if available. See ENVIRONMENT for the correct environment variables to use.
.\" .SH ENVIRONMENT
.\" Every live-helper command respects the following environment variables if available.
.\" .IP "\fI$LH_DEBUG\fR" 4
.\" enables debug (Default: false)
.\" .IP "\fI$LH_QUIET\fR" 4
.\" be quiet (Default: false)
.\" .IP "\fI$LH_VERBOSE\fR" 4
.\" be verbose (Default: false)
.SH LIVE\-HELPER COMMANDS
Here is the complete list of available live\-helper commands. See their man pages for additional documentation.
.IP "\fIlh_binary\fR(1)" 4
meta-helper for lh_binary_*.
.IP "\fIlh_binary_encryption\fR(1)" 4
encrypts the root filesystem.
.IP "\fIlh_binary_includes\fR(1)" 4
copies files into the binary image.
.IP "\fIlh_binary_hdd\fR(1)" 4
creates the harddisk binary tarball.
.IP "\fIlh_binary_iso\fR(1)" 4
creates the CD/DVD binary image.
.IP "\fIlh_binary_linuximage\fR(1)" 4
copies linux-image into the binary image.
.IP "\fIlh_binary_localincludes\fR(1)" 4
copies local files into the binary image.
.IP "\fIlh_binary_manifest\fR(1)" 4
creates the package list of the root filesystem.
.IP "\fIlh_binary_md5sum\fR(1)" 4
creates md5sum.txt in the binary image.
.IP "\fIlh_binary_memtest86\fR(1)" 4
copies memtest86 into the binary image.
.IP "\fIlh_binary_net\fR(1)" 4
creates the netboot binary tarball.
.IP "\fIlh_binary_rootfs\fR(1)" 4
creates the root filesystem.
.IP "\fIlh_binary_syslinux\fR(1)" 4
copies syslinux into the binary image.
.IP "\fIlh_binary_usb\fR(1)" 4
creates the USB binary image.
.IP "\fIlh_bootstrap\fR(1)" 4
meta-helper for lh_bootstrap_*.
.IP "\fIlh_bootstrap_cdebootstrap\fR(1)" 4
bootstraps system with cdebootstrap.
.IP "\fIlh_bootstrap_debootstrap\fR(1)" 4
bootstraps system with debootstrap.
.IP "\fIlh_build\fR(1)" 4
meta-helper for lh_bootstrap, lh_chroot, lh_binary and lh_source.
.IP "\fIlh_chroot\fR(1)" 4
meta-helper for lh_chroot_*.
.IP "\fIlh_chroot_apt\fR(1)" 4
configures /etc/apt/apt.conf in chroot.
.IP "\fIlh_chroot_debianchroot\fR(1)" 4
configures /etc/debian_chroot in chroot.
.IP "\fIlh_chroot_hacks\fR(1)" 4
does evil (temporary) hacks in the chroot.
.IP "\fIlh_chroot_hooks\fR(1)" 4
executes additional commands in the chroot.
.IP "\fIlh_chroot_hosts\fR(1)" 4
configures /etc/hosts in the chroot.
.IP "\fIlh_chroot_linuximage\fR(1)" 4
configures /etc/kernel-img.conf in the chroot.
.IP "\fIlh_chroot_localhooks\fR(1)" 4
executes additional local commands in the chroot.
.IP "\fIlh_chroot_localincludes\fR(1)" 4
copies local files into the binary image.
.IP "\fIlh_chroot_localization\fR(1)" 4
installs localization packages in the chroot.
.IP "\fIlh_chroot_localpackages\fR(1)" 4
installs local packages in the chroot.
.IP "\fIlh_chroot_localpackageslist\fR(1)" 4
installs local packages lists in the chroot.
.IP "\fIlh_chroot_packages\fR(1)" 4
installs packages in the chroot.
.IP "\fIlh_chroot_packageslist\fR(1)" 4
installs packages lists in the chroot.
.IP "\fIlh_chroot_proc\fR(1)" 4
mounts /proc in the chroot.
.IP "\fIlh_chroot_resolv\fR(1)" 4
configures /etc/resolf.conf in the chroot.
.IP "\fIlh_chroot_sources\fR(1)" 4
configures /etc/apt/sources.list in the chroot.
.IP "\fIlh_chroot_symlinks\fR(1)" 4
converts symlinks in the chroot.
.IP "\fIlh_chroot_sysfs\fR(1)" 4
mounts /sys in the chroot.
.IP "\fIlh_chroot_sysvinit\fR(1)" 4
minimizes daemon startup in the chroot.
.IP "\fIlh_chroot_sysvrc\fR(1)" 4
installs policy-id hack in the chroot.
.IP "\fIlh_chroot_tasks\fR(1)" 4
installs packages tasks in the chroot.
.IP "\fIlh_clean\fR(1)" 4
cleans up build directory.
.IP "\fIlh_config\fR(1)" 4
creates sample configuration.
.IP "\fIlh_losetup\fR(1)" 4
manages loop device handling
.IP "\fIlh_source\fR(1)" 4
meta-helper for lh_source_*.
.IP "\fIlh_source_config\fR(1)" 4
copies config into source directory.
.IP "\fIlh_source_download\fR(1)" 4
downloads source packages.
.IP "\fIlh_source_hdd\fR(1)" 4
creates harddisk source tarball.
.IP "\fIlh_source_generic\fR(1)" 4
creates generic source tarball.
.IP "\fIlh_source_iso\fR(1)" 4
creates CD/DVD source image.
.IP "\fIlh_source_net\fR(1)" 4
creates netboot source tarball.
.IP "\fIlh_source_usb\fR(1)" 4
creates USB source image.
.IP "\fIlh_testroot\fR(1)" 4
checks for root privileges.
.SH BUGS
Report bugs against live\-helper <\fIhttp://packages.qa.debian.org/live\-helper/\fR>.
.SH HOMEPAGE
More information about the Debian Live project can be found at <\fIhttp://debian\-live.alioth.debian.org/\fR> and <\fIhttp://wiki.debian.org/DebianLive/\fR>.
.SH AUTHOR
live\-helper was written by Daniel Baumann <\fIdaniel@debian.org\fR> and Marco Amadori <\fImarco.amadori@gmail.com\fR>, for the Debian project.

View File

@ -13,9 +13,9 @@ permitted by applicable law.
--- ---
This Debian Live system was built with live-helper, version LIVE_VERSION. This Debian Live system was built with live-helper, version LIVE_VERSION.
live-helper was written by Daniel Baumann <daniel@debian.org> and
Marco Amadori <marco.amadori@gmail.com>.
More information about the Debian Live project can be found at
<http://debian-live.alioth.debian.org/>.

View File

@ -16,12 +16,12 @@ label cifslegacy
append initrd=initrd.gz boot=casper root=/dev/cifs nfsroot=LIVE_SERVER_ADDRESS:LIVE_SERVER_PATH LIVE_BOOTAPPEND append initrd=initrd.gz boot=casper root=/dev/cifs nfsroot=LIVE_SERVER_ADDRESS:LIVE_SERVER_PATH LIVE_BOOTAPPEND
label memtest label memtest
kernel memtest kernel memtest
display isolinux.txt display pxelinux.cfg/isolinux.txt
timeout 0 timeout 0
prompt 1 prompt 1
f1 f1.txt F1 pxelinux.cfg/f1.txt
f3 f3.txt F3 pxelinux.cfg/f3.txt
f4 f4.txt F4 pxelinux.cfg/f4.txt
f8 f8.txt F8 pxelinux.cfg/f8.txt
f9 f9.txt F9 pxelinux.cfg/f9.txt
f0 f10.txt F0 pxelinux.cfg/f10.txt