Adding live-helper 1.0~a4-1.

This commit is contained in:
Daniel Baumann 2007-09-23 10:04:49 +02:00
parent d3cf9b4d93
commit 8762edaa61
71 changed files with 911 additions and 304 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
live-helper (1.0~a4-1) unstable; urgency=low
* New upstream release.
-- Daniel Baumann <daniel@debian.org> Mon, 2 Apr 2007 00:00:00 +0100
live-helper (1.0~a3-2) unstable; urgency=low live-helper (1.0~a3-2) unstable; urgency=low
* Fixed typo in maintainer scripts. * Fixed typo in maintainer scripts.

1
debian/control vendored
View File

@ -5,6 +5,7 @@ Maintainer: Debian Live <debian-live-devel@lists.alioth.debian.org>
Uploaders: Daniel Baumann <daniel@debian.org>, Marco Amadori <marco.amadori@gmail.com> Uploaders: Daniel Baumann <daniel@debian.org>, Marco Amadori <marco.amadori@gmail.com>
Build-Depends: debhelper (>= 5) Build-Depends: debhelper (>= 5)
Standards-Version: 3.7.2 Standards-Version: 3.7.2
XS-Vcs-Svn: svn://svn.debian.org/debian-live/dists/trunk/live-helper/
Package: live-helper Package: live-helper
Architecture: all Architecture: all

View File

@ -1,10 +1,74 @@
2006-03-26 Daniel Baumann <daniel@debian.org> 2007-04-05 Daniel Baumann <daniel@debian.org>
* helpers/lh_binary_grub, templates/grub/menu.lst:
- Added splash functionality.
* Uploaded 1.0~a4-1.
2007-04-03 Daniel Baumann <daniel@debian.org>
* helpers/lh_binary_grub, lh_binary_grub:
- Added check for LIVE_TEMPLATES to be existing.
* helpers/lh_binary_includes:
- Added check for LIVE_INCLUDES to be existing.
2007-04-02 Daniel Baumann <daniel@debian.org>
* functions/*, helpers/*:
- Merged LIVE_SYSLINUX and LIVE_GRUB into LIVE_BOOTLOADER.
* helpers/lh_binary_iso:
- Added exclude for the bootloader from the iso image content.
2007-04-01 Daniel Baumann <daniel@debian.org>
* helper/lh_binary_grub:
- Added.
2007-03-30 Daniel Baumann <daniel@debian.org>
* helper/lh_chroot_localincludes:
- Fixed wrong path for hook removal.
2007-03-29 Daniel Baumann <daniel@debian.org>
* functions/common.sh, echo.sh:
- Added.
* doc/README, helpers/lh_source, manpages/lh_binary.1, live-helper.7:
- Added forgotten helpers.
* doc/FAQ:
- Added.
* lists/mini, minimal:
- Added --yes to apt call to make them non-interactive.
* manpages/lh_chroot.1:
- Added.
2007-03-28 Daniel Baumann <daniel@debian.org>
* helpers/lh_bootstrap_cdebootstrap, lh_bootstrap_debootstrap:
- Added --debug, --quiet, and --verbose.
2007-03-27 Daniel Baumann <daniel@debian.org>
* helpers/lh_binary_linuximage, lh_binary_memtest86:
- Added missing Read_conffiles to fix foreign architecture builds.
2007-03-26 Daniel Baumann <daniel@debian.org>
* helpers/lh_bootstrap_cdebootstrap, lh_bootstrap_debootstrap,
lh_clean:
- Added routine to cache bootstrapped chroot as suggested by Kai
Hendry <hendry@iki.fi>.
* helpers/lh_chroot_rootfs:
- Fixed typo in net type.
* lists/gnome*, kde*, standard-x11, xfce*:
- Added menu.
2007-03-26 Daniel Baumann <daniel@debian.org>
* functions/defaults.sh: * functions/defaults.sh:
- Fixed handling of desktop list variable loop. - Fixed handling of desktop list variable loop.
* Uploaded 1.0~a3-1. * Uploaded 1.0~a3-1.
2006-03-25 Daniel Baumann <daniel@debian.org> 2007-03-25 Daniel Baumann <daniel@debian.org>
* functions/*, helpers/*: * functions/*, helpers/*:
- Renamed LIVE_FLAVOUR to LIVE_BOOTSTRAP_FLAVOUR. - Renamed LIVE_FLAVOUR to LIVE_BOOTSTRAP_FLAVOUR.
@ -35,7 +99,7 @@
* lists/minimal-net: * lists/minimal-net:
- Minimized. - Minimized.
2006-03-24 Daniel Baumann <daniel@debian.org> 2007-03-24 Daniel Baumann <daniel@debian.org>
* functions/*, helpers/*, hooks/*: * functions/*, helpers/*, hooks/*:
- Added GPL blurb. - Added GPL blurb.
@ -53,12 +117,12 @@
* helpers/lh_clean: * helpers/lh_clean:
- Added purge. - Added purge.
2006-03-23 Daniel Baumann <daniel@debian.org> 2007-03-23 Daniel Baumann <daniel@debian.org>
* helpers/make-live: * helpers/make-live:
- Calling Arguments twice to catch case with non-default root. - Calling Arguments twice to catch case with non-default root.
2006-03-22 Daniel Baumann <daniel@debian.org> 2007-03-22 Daniel Baumann <daniel@debian.org>
* functions/default.sh, helpers/*: * functions/default.sh, helpers/*:
- Renamed lh_chroot_packageslist to lh_chroot_packageslists and - Renamed lh_chroot_packageslist to lh_chroot_packageslists and
@ -71,7 +135,7 @@
- Added check for LIVE_KERNEL_PACKGES=none to allow kernel packages as - Added check for LIVE_KERNEL_PACKGES=none to allow kernel packages as
local packages. local packages.
2006-03-21 Daniel Baumann <daniel@debian.org> 2007-03-21 Daniel Baumann <daniel@debian.org>
* helpers/lh_binary_hdd, lh_binary_iso, lh_binary_net, lh_binary_usb: * helpers/lh_binary_hdd, lh_binary_iso, lh_binary_net, lh_binary_usb:
- Checking earlier if there is something todo. - Checking earlier if there is something todo.
@ -90,17 +154,17 @@
- Renamed LIVE_MIRROR_LOCAL to LIVE_MIRROR_BUILD and - Renamed LIVE_MIRROR_LOCAL to LIVE_MIRROR_BUILD and
LIVE_MIRROR_GENERIC to LIVE_MIRROR_IMAGE. LIVE_MIRROR_GENERIC to LIVE_MIRROR_IMAGE.
2006-03-20 Daniel Baumann <daniel@debian.org> 2007-03-20 Daniel Baumann <daniel@debian.org>
* helpers/make-live: * helpers/make-live:
- Fixed typo in ARGUMENTS. - Fixed typo in ARGUMENTS.
2006-03-19 Daniel Baumann <daniel@debian.org> 2007-03-19 Daniel Baumann <daniel@debian.org>
* lists/gnome*, kde*, standard-x11, xfce*: * lists/gnome*, kde*, standard-x11, xfce*:
- Added alsa-base, alsa-oss, alsa-utils, and discover. - Added alsa-base, alsa-oss, alsa-utils, and discover.
2006-03-19 Daniel Baumann <daniel@debian.org> 2007-03-19 Daniel Baumann <daniel@debian.org>
* Uploaded 1.0~a2-1. * Uploaded 1.0~a2-1.

29
doc/FAQ Normal file
View File

@ -0,0 +1,29 @@
Debian Live: Frequently Asked Questions (FAQ)
=============================================
Build Time
----------
Q: How do I drop in to a shell during make-live chroot process?
A: Use "--interactive shell", then exit when you have made the setting changes
you want and the build process will continue.
Q: Where to set the username or the hostname?
A: casper uses default username 'casper' and hostname 'live'. You can specify
them by passing 'username=' and 'hostname=' as kernel parameters (In previous
casper releases it was 'host=').
live-helper automatically sets the username to 'user' and the hostname to
'debian'. If you want to change this at build time, pass --username and
--hostname to make-live, or alter LIVE_USERNAME and LIVE_HOSTNAME in
config/image.
Run Time
--------
Q: What is the root password?
A: There is none. You can switch to root with 'sudo su -' or set a password with
'sudo passwd'.
Q: What is the user password?
A: The user password for 'user' is 'live'.

View File

@ -1,7 +1,8 @@
* lh_config * lh_config
* lh_bootstrap * lh_bootstrap
|_ lh_cdebootstrap | lh_debootstrap |_ lh_cdebootstrap
|_ lh_debootstrap
* lh_chroot * lh_chroot
|_ lh_chroot_proc install |_ lh_chroot_proc install
@ -26,6 +27,7 @@
|_ lh_chroot_hooks |_ lh_chroot_hooks
|_ lh_chroot_localhooks |_ lh_chroot_localhooks
|_ lh_chroot_symlinks |_ lh_chroot_symlinks
|_ lh_chroot_interactive
| |
|_ lh_chroot_linuximage remove |_ lh_chroot_linuximage remove
|_ lh_chroot_sources remove |_ lh_chroot_sources remove
@ -38,18 +40,21 @@
|_ lh_chroot_proc remove |_ lh_chroot_proc remove
* lh_binary * lh_binary
|_ lh_binary_rootfs |_ lh_binary_chroot
|_ lh_binary_manifest
|_ lh_binary_encryption
| |
|_ lh_chroot_proc install |_ lh_chroot_proc install
|_ lh_chroot_sysfs install |_ lh_chorot_sysfs install
|_ lh_chroot_hosts install |_ lh_chroot_hosts install
|_ lh_chroot_resolv install |_ lh_chroot_resolv install
|_ lh_chroot_sources install |_ lh_chroot_sources install
| |
|_ lh_binary_rootfs
|_ lh_binary_manifest
|_ lh_binary_encryption
|
|_ lh_binary_linuximage |_ lh_binary_linuximage
|_ lh_binary_memtest86 |_ lh_binary_memtest86
|_ lh_binary_grub
|_ lh_binary_syslinux |_ lh_binary_syslinux
|_ lh_binary_includes |_ lh_binary_includes
|_ lh_binary_localincludes |_ lh_binary_localincludes
@ -73,9 +78,10 @@
| |
|_ lh_source_config |_ lh_source_config
|_ lh_source_download |_ lh_source_download
|_ lh_source_md5sum
| |
|_ lh_source_hdd
|_ lh_source_generic |_ lh_source_generic
|_ lh_source_hdd
|_ lh_source_iso |_ lh_source_iso
|_ lh_source_net |_ lh_source_net
|_ lh_source_usb |_ lh_source_usb

13
doc/examples/java-hook.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
# This is a hook for live-helper(7) to install sun-java.
# To enable it, copy this hook into your config/chroot_localhooks directory.
#
# live-helper sets DEBIAN_FRONTEND to 'noninteractive' to advise debconf to not
# ask any questions while installing packages. Suns redistribution terms for
# Java do not allow this, therefore we need to overwrite DEBIAN_FRONTEND for
# this apt-get call only.
DEBIAN_FRONTEND="dialog" apt-get install --yes sun-java6-bin sun-java6-demo \
sun-java6-doc sun-java6-fonts sun-java6-jdk sun-java6-jre \
sun-java6-plugin sun-java6-source

View File

@ -9,15 +9,13 @@
set -e set -e
PROGRAM="`basename ${0}`"
Arguments () Arguments ()
{ {
ARGUMENTS="`getopt --longoptions force,help,usage,version --name=${PROGRAM} --options huv --shell sh -- "${@}"`" ARGUMENTS="`getopt --longoptions conffile:,debug,force,help,logfile:,quiet,usage,verbose,version --name=${PROGRAM} --options huv --shell sh -- "${@}"`"
if [ "${?}" != "0" ] if [ "${?}" != "0" ]
then then
echo "terminating" >&2 Echo_error "terminating" >&2
exit 1 exit 1
fi fi
@ -27,11 +25,11 @@ Arguments ()
do do
case "${1}" in case "${1}" in
--conffile) --conffile)
CONFFILE="FIXME"; shift CONFFILE="${2}"; shift 2
;; ;;
--debug) --debug)
DEBUG="FIXME"; shift DEBUG="true"; shift
;; ;;
--force) --force)
@ -43,11 +41,11 @@ Arguments ()
;; ;;
--logfile) --logfile)
LOGFILE="FIXME"; shift LOGFILE="${2}"; shift 2
;; ;;
--quiet) --quiet)
QUIET="FIXME"; shift QUIET="true"; shift
;; ;;
-u|--usage) -u|--usage)
@ -55,7 +53,7 @@ Arguments ()
;; ;;
--verbose) --verbose)
VERBOSE="FIXME"; shift VERBOSE="true"; shift
;; ;;
-v|--version) -v|--version)
@ -67,7 +65,7 @@ Arguments ()
;; ;;
*) *)
echo "internal error" Echo_error "internal error"
exit 1 exit 1
;; ;;
esac esac

8
functions/breakpoints.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
# breakpoints.sh
# Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org>
#
# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
# This is free software, and you are welcome to redistribute it
# under certain conditions; see COPYING for details.

View File

@ -11,21 +11,21 @@ set -e
Restore_cache () Restore_cache ()
{ {
CACHEDIRECTORY="${1}" DIRECTORY="${1}"
if [ "${LH_CACHE}" = "enabled" ] if [ "${LH_CACHE}" = "enabled" ]
then then
if [ -d "${CACHEDIRECTORY}" ] if [ -d "${DIRECTORY}" ]
then then
# Restore old cache # Restore old cache
cp "${CACHEDIRECTORY}"/*.deb chroot/var/cache/apt/archives cp "${DIRECTORY}"/*.deb chroot/var/cache/apt/archives
fi fi
fi fi
} }
Save_cache () Save_cache ()
{ {
CACHEDIRECTORY="${1}" DIRECTORY="${1}"
if [ "${LH_CACHE}" = "enabled" ] if [ "${LH_CACHE}" = "enabled" ]
then then
@ -35,13 +35,13 @@ Save_cache ()
if ls chroot/var/cache/apt/archives/*.deb &> /dev/null if ls chroot/var/cache/apt/archives/*.deb &> /dev/null
then then
# Creating cache directory # Creating cache directory
if [ ! -d "${CACHEDIRECTORY}" ] if [ ! -d "${DIRECTORY}" ]
then then
mkdir -p "${CACHEDIRECTORY}" mkdir -p "${DIRECTORY}"
fi fi
# Saving new cache # Saving new cache
mv -f chroot/var/cache/apt/archives/*.deb "${CACHEDIRECTORY}" mv -f chroot/var/cache/apt/archives/*.deb "${DIRECTORY}"
fi fi
else else
# Purging current cache # Purging current cache

View File

@ -14,5 +14,6 @@ Chroot ()
COMMANDS="${1}" COMMANDS="${1}"
# Executing commands in chroot # Executing commands in chroot
Echo_debug "Executing: ${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} 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}
} }

13
functions/common.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
# common.sh - common things for all live-helpers
# Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org>
#
# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
# This is free software, and you are welcome to redistribute it
# under certain conditions; see COPYING for details.
set -e
PROGRAM="`basename ${0}`"
VERSION="1.0~a4"

View File

@ -11,17 +11,16 @@ set -e
Read_conffile () Read_conffile ()
{ {
CONFFILE="${1}" FILE="${1}"
# Reading configuration file if [ -f "${FILE}" ]
if [ -f "${CONFFILE}" ]
then then
if [ -r "${CONFFILE}" ] if [ -r "${FILE}" ]
then then
# Sourcing configurationfile Echo_debug "Reading configuration file ${FILE}"
. "${CONFFILE}" . "${FILE}"
else else
echo "W: failed to read ${CONFFILE}" Echo_warning "Failed to read configuration file ${FILE}"
fi fi
fi fi
} }

View File

@ -274,17 +274,17 @@ Set_defaults ()
case "${LIST}" in case "${LIST}" in
gnome-desktop) gnome-desktop)
LIVE_PACKAGES_LISTS="`echo ${LIVE_PACKAGES_LISTS} | sed -e 's/gnome-desktop//'` standard-x11" LIVE_PACKAGES_LISTS="`echo ${LIVE_PACKAGES_LISTS} | sed -e 's/gnome-desktop//'` standard-x11"
LIVE_TASKS="`echo ${LIVE_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/desktop//' -e 's/gnome-desktop//'` standard laptop desktop gnome-desktop" LIVE_TASKS="`echo ${LIVE_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/gnome-desktop//' -e 's/desktop//'` standard laptop desktop gnome-desktop"
;; ;;
kde-desktop) kde-desktop)
LIVE_PACKAGES_LISTS="`echo ${LIVE_PACKAGES_LISTS} | sed -e 's/kde-desktop//'` standard-x11" LIVE_PACKAGES_LISTS="`echo ${LIVE_PACKAGES_LISTS} | sed -e 's/kde-desktop//'` standard-x11"
LIVE_TASKS="`echo ${LIVE_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/desktop//' -e 's/kde-desktop//'` standard laptop desktop kde-desktop" LIVE_TASKS="`echo ${LIVE_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/kde-desktop//' -e 's/desktop//'` standard laptop desktop kde-desktop"
;; ;;
xfce-desktop) xfce-desktop)
LIVE_PACKAGES_LISTS="`echo ${LIVE_PACKAGES_LISTS} | sed -e 's/xfce-desktop//'` standard-x11" LIVE_PACKAGES_LISTS="`echo ${LIVE_PACKAGES_LISTS} | sed -e 's/xfce-desktop//'` standard-x11"
LIVE_TASKS="`echo ${LIVE_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/desktop//' -e 's/xfce-desktop//'` standard laptop desktop xfce-desktop" LIVE_TASKS="`echo ${LIVE_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/xfce-desktop//' -e 's/desktop//'` standard laptop desktop xfce-desktop"
;; ;;
esac esac
done done
@ -339,30 +339,13 @@ Set_defaults ()
# Setting image type # Setting image type
if [ -z "${LIVE_SOURCE_IMAGE}" ] if [ -z "${LIVE_SOURCE_IMAGE}" ]
then then
if [ "${LIVE_BINARY_IMAGE}" = "iso" ] LIVE_SOURCE_IMAGE="generic"
then
LIVE_SOURCE_IMAGE="iso"
elif [ "${LIVE_BINARY_IMAGE}" = "usb" ]
then
LIVE_SOURCE_IMAGE="usb"
elif [ "${LIVE_BINARY_IMAGE}" = "net" ]
then
LIVE_SOURCE_IMAGE="net"
fi
fi fi
# Setting filesystem # Setting filesystem
if [ -z "${LIVE_FILESYSTEM}" ] && [ "${LIVE_BINARY_IMAGE}" = "iso" ] if [ -z "${LIVE_FILESYSTEM}" ]
then then
LIVE_FILESYSTEM="squashfs" LIVE_FILESYSTEM="squashfs"
elif [ -z "${LIVE_FILESYSTEM}" ] && [ "${LIVE_BINARY_IMAGE}" = "usb" ]
then
LIVE_FILESYSTEM="squashfs"
elif [ -z "${LIVE_FILESYSTEM}" ] && [ "${LIVE_BINARY_IMAGE}" = "net" ]
then
LIVE_FILESYSTEM="plain"
else
LIVE_FILESYSTEM="squashfs"
fi fi
# Setting memtest86 option # Setting memtest86 option
@ -395,12 +378,15 @@ Set_defaults ()
LIVE_SOURCE="disabled" LIVE_SOURCE="disabled"
fi fi
# Setting syslinux # Setting grub
if [ -z "${LIVE_SYSLINUX}" ] if [ -z "${LIVE_BOOTLOADER}" ]
then then
LIVE_SYSLINUX="enabled" LIVE_BOOTLOADER="syslinux"
fi fi
# Setting grub splash
# LIVE_GRUB_SPLASH
# Setting syslinux splash # Setting syslinux splash
# LIVE_SYSLINUX_SPLASH # LIVE_SYSLINUX_SPLASH

44
functions/echo.sh Executable file
View File

@ -0,0 +1,44 @@
#!/bin/sh
# echo.sh - define output methods
# Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org>
#
# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
# This is free software, and you are welcome to redistribute it
# under certain conditions; see COPYING for details.
set -e
Echo_debug ()
{
if [ "${DEBUG}" = "true" ]
then
echo "D: ${@}"
fi
}
Echo_error ()
{
echo "E: ${@}"
}
Echo_message ()
{
if [ "${QUIET}" != "true" ]
then
echo "P: ${@}"
fi
}
Echo_verbose ()
{
if [ "${VERBOSE}" = "true" ]
then
echo "I: ${@}"
fi
}
Echo_warning ()
{
echo "W: ${@}"
}

View File

@ -11,30 +11,30 @@ set -e
Check_lockfile () Check_lockfile ()
{ {
LOCKFILE="${1}" FILE="${1}"
# Checking lock file # Checking lock file
if [ -f "${LOCKFILE}" ] if [ -f "${FILE}" ]
then then
echo "E: system locked" Echo_error "system locked"
exit 1 exit 1
fi fi
} }
Create_lockfile () Create_lockfile ()
{ {
LOCKFILE="${1}" FILE="${1}"
LOCKDIRECTORY="`dirname ${1}`" DIRECTORY="`dirname ${1}`"
# Creating lock directory # Creating lock directory
if [ ! -d "${LOCKDIRECTORY}" ] if [ ! -d "${DIRECTORY}" ]
then then
mkdir -p "${LOCKDIRECTORY}" mkdir -p "${DIRECTORY}"
fi fi
# Creating lock trap # Creating lock trap
trap "test -f ${LOCKFILE} && rm -f ${LOCKFILE}; exit 0" 0 2 15 trap "test -f ${FILE} && rm -f ${FILE}; exit 0" 0 2 15
# Creating lock file # Creating lock file
touch "${LOCKFILE}" touch "${FILE}"
} }

View File

@ -11,19 +11,19 @@ set -e
Check_stagefile () Check_stagefile ()
{ {
STAGEFILE="${1}" FILE="${1}"
STAGENAME="`basename ${1}`" NAME="`basename ${1}`"
# Checking stage file # Checking stage file
if [ -f "${STAGEFILE}" ] if [ -f "${FILE}" ]
then then
if [ "${FORCE}" = "true" ] if [ "${FORCE}" = "true" ]
then then
# Forcing execution # Forcing execution
rm -f "${STAGEFILE}" rm -f "${FILE}"
else else
# Skipping execution # Skipping execution
echo "W: skipping ${STAGENAME}" Echo_warning "skipping ${NAME}"
exit 0 exit 0
fi fi
fi fi
@ -31,28 +31,28 @@ Check_stagefile ()
Create_stagefile () Create_stagefile ()
{ {
STAGEFILE="${1}" FILE="${1}"
STAGEDIRECTORY="`dirname ${1}`" DIRECTORY="`dirname ${1}`"
# Creating stage directory # Creating stage directory
if [ ! -d "${STAGEDIRECTORY}" ] if [ ! -d "${DIRECTORY}" ]
then then
mkdir -p "${STAGEDIRECTORY}" mkdir -p "${DIRECTORY}"
fi fi
# Creating stage file # Creating stage file
touch "${STAGEFILE}" touch "${FILE}"
} }
Require_stagefile () Require_stagefile ()
{ {
STAGEFILE="${1}" FILE="${1}"
STAGENAME="`basename ${1}`" NAME="`basename ${1}`"
# Checking stage file # Checking stage file
if [ ! -f "${STAGEFILE}" ] if [ ! -f "${FILE}" ]
then then
echo "E: ${STAGENAME} missing" Echo_error "${NAME} missing"
exit 1 exit 1
fi fi
} }

View File

@ -9,8 +9,6 @@
set -e set -e
VERSION="1.0~a3"
Version () Version ()
{ {
echo "${PROGRAM}, version ${VERSION}" echo "${PROGRAM}, version ${VERSION}"

View File

@ -22,43 +22,41 @@ USAGE="${PROGRAM} [--force]"
Arguments "${@}" Arguments "${@}"
if [ "${FORCE}" = "true" ] Echo_debug "Init ${PROGRAM}"
then
OPTIONS="${OPTIONS} --force"
fi
# Preparing root filesystem # Preparing root filesystem
lh_binary_chroot "${OPTIONS}" lh_binary_chroot "${@}"
# Configuring chroot # Configuring chroot
lh_chroot_proc install "${OPTIONS}" lh_chroot_proc install "${@}"
lh_chroot_sysfs install "${OPTIONS}" lh_chroot_sysfs install "${@}"
lh_chroot_hosts install "${OPTIONS}" lh_chroot_hosts install "${@}"
lh_chroot_resolv install "${OPTIONS}" lh_chroot_resolv install "${@}"
lh_chroot_sources install "${OPTIONS}" lh_chroot_sources install "${@}"
# Building root filesystem # Building root filesystem
lh_binary_rootfs "${OPTIONS}" lh_binary_rootfs "${@}"
lh_binary_manifest "${OPTIONS}" lh_binary_manifest "${@}"
lh_binary_encryption "${OPTIONS}" lh_binary_encryption "${@}"
# Prepare images # Prepare images
lh_binary_linuximage "${OPTIONS}" lh_binary_linuximage "${@}"
lh_binary_memtest86 "${OPTIONS}" lh_binary_memtest86 "${@}"
lh_binary_syslinux "${OPTIONS}" lh_binary_grub "${@}"
lh_binary_includes "${OPTIONS}" lh_binary_syslinux "${@}"
lh_binary_localincludes "${OPTIONS}" lh_binary_includes "${@}"
lh_binary_md5sum "${OPTIONS}" lh_binary_localincludes "${@}"
lh_binary_md5sum "${@}"
# Building images # Building images
lh_binary_hdd "${OPTIONS}" lh_binary_hdd "${@}"
lh_binary_iso "${OPTIONS}" lh_binary_iso "${@}"
lh_binary_net "${OPTIONS}" lh_binary_net "${@}"
lh_binary_usb "${OPTIONS}" lh_binary_usb "${@}"
# Deconfiguring chroot # Deconfiguring chroot
rm -f .stage/chroot_sources rm -f .stage/chroot_sources
lh_chroot_resolv remove "${OPTIONS}" lh_chroot_resolv remove "${@}"
lh_chroot_hosts remove "${OPTIONS}" lh_chroot_hosts remove "${@}"
lh_chroot_sysfs remove "${OPTIONS}" lh_chroot_sysfs remove "${@}"
lh_chroot_proc remove "${OPTIONS}" lh_chroot_proc remove "${@}"

222
helpers/lh_binary_grub Executable file
View File

@ -0,0 +1,222 @@
#!/bin/sh
# lh_binary_grub(1) - installs grub into binary
# Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org>
#
# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
# This is free software, and you are welcome to redistribute it
# under certain conditions; see COPYING for details.
set -e
# Source common functions
for FUNCTION in /usr/share/live-helper/functions/*.sh
do
. ${FUNCTION}
done
# Set static variables
DESCRIPTION="installs grub into binary"
HELP=""
USAGE="${PROGRAM} [--force]"
Arguments "${@}"
# Reading configuration files
Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
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_grub
if [ "${LIVE_ARCHITECTURE}" != "amd64" ] && [ "${LIVE_ARCHITECTURE}" != "i386" ]
then
echo "W: skipping binary_grub, foreign architecture."
exit 0
fi
if [ "${LIVE_BOOTLOADER}" = "grub" ]
then
# Check templates
if [ ! -d "${LIVE_TEMPLATES}" ]
then
if [ -d ../"${LIVE_TEMPLATES}" ]
then
LIVE_TEMPLATES="../${LIVE_TEMPLATES}"
else
Echo_error "user specified templates not accessible in ${LIVE_TEMPLATES}"
exit 1
fi
fi
if [ ! -f chroot/usr/sbin/grub ]
then
PACKAGES="${PACKAGES} grub"
fi
if [ -n "${PACKAGES}" ]
then
# Installing symlinks
case "${LH_APT}" in
apt|apt-get)
Chroot "apt-get install --yes ${PACKAGES}"
;;
aptitude)
Chroot "aptitude install --assume-yes ${PACKAGES}"
;;
esac
fi
# Setting destination directory
case "${LIVE_BINARY_IMAGE}" in
iso|usb|hdd)
DESTDIR="binary/live"
;;
net)
Echo_error "not supported, FIXME"
;;
esac
# Temporary check for broken syslinux
if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
then
case "${LIVE_ARCHITECTURE}" in
i386)
DESTDIR="${DESTDIR}.386"
;;
esac
fi
# Creating directory
if [ ! -d "${DESTDIR}" ]
then
mkdir -p "${DESTDIR}"
fi
# Setting boot parameters
if [ -n "${LIVE_ENCRYPTION}" ]
then
LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND} encryption=${LIVE_ENCRYPTION}"
fi
if [ -n "${LIVE_USERNAME}" ]
then
LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND} username=${LIVE_USERNAME}"
fi
if [ -n "${LIVE_HOSTNAME}" ]
then
LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND} hostname=${LIVE_HOSTNAME}"
fi
LIVE_BOOTAPPEND="`echo ${LIVE_BOOTAPPEND} | sed -e 's/ //'`"
# Assembling kernel configuration
if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
then
DEFAULT_FLAVOUR="`echo ${LIVE_KERNEL_FLAVOUR} | awk '{ print $1 }'`"
LINUX="title\t\tDebian GNU/Linux - Live\nroot\t\t(cd)\nkernel\t\t/`basename ${DESTDIR}`/`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
else
DEFAULT_FLAVOUR="`echo ${LIVE_KERNEL_FLAVOUR} | awk '{ print $1 }'`"
LINUX="title\t\tDebian GNU/Linux - Live\nroot\t\t(cd)\nkernel\t\t`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\ninitrd\t\tinitrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
fi
if [ "`echo ${LIVE_KERNEL_FLAVOUR} | wc -w`" -gt "1" ]
then
for KERNEL in chroot/boot/vmlinuz*
do
if [ -z "${LINUX}" ]
then
if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
then
LINUX="title\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nroot\t\t(cd)\nkernel\t\t/`basename ${DESTDIR}`/`basename ${KERNEL}`\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
else
LINUX="title\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nroot\t\t(cd)\nkernel\t\t`basename ${KERNEL}`\ninitrd\t\tinitrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
fi
else
if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
then
LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nroot\t\t(cd)\nkernel /`basename ${DESTDIR}`/`basename ${KERNEL}`\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
else
LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nroot\t\t(cd)\nkernel `basename ${KERNEL}`\ninitrd\t\tinitrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
fi
fi
done
fi
LINUX="`echo ${LINUX} | sed -e 's#//#/#g'`"
# Assembling memtest configuration
if [ -f "${DESTDIR}"/memtest ]
then
if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
then
MEMTEST="title\t\tMemtest86+\nroot\t\t(cd)\nkernel\t\t/`basename ${DESTDIR}`/memtest"
MEMTEST="`echo ${MEMTEST} | sed -e 's#//#/#g'`"
else
MEMTEST="title\t\tMemtest86+\nroot\t\t(cd)\nkernel\t\tmemtest"
fi
fi
mkdir -p binary/boot/grub
cp -r "${LIVE_TEMPLATES}"/grub/* binary/boot/grub
if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
then
cp chroot/usr/lib/grub/i386-pc/stage2_eltorito binary/boot/grub
fi
# Copying splash screen
if [ -n "${LIVE_GRUB_SPLASH}" ]
then
# FIXME
cp "${LIVE_GRUB_SPLASH}" binary/boot/grub
LIVE_SPLASH="splashimage /boot/grub/`basename ${LIVE_GRUB_SPLASH}`"
fi
# Configure grub templates
cat >> binary/boot/grub/menu.lst << EOF
# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other:
root
LIVE_MEMTEST
EOF
sed -i -e "s#LIVE_SPLASH#${LIVE_SPLASH}#" -e "s#LIVE_KERNEL_LIVE#${LINUX}#" -e "s#LIVE_KERNEL_INSTALL#${LIVE_KERNEL_INSTALL}#" -e "s#LIVE_MEMTEST#${MEMTEST}#" binary/boot/grub/menu.lst
sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" binary/boot/grub/menu.lst
if [ -n "${PACKAGES}" ]
then
# Removing packages
case "${LH_APT}" in
apt|apt-get)
Chroot "apt-get remove --purge --yes ${PACKAGES}"
;;
aptitude)
Chroot "aptitude purge --assume-yes ${PACKAGES}"
;;
esac
fi
# Creating stage file
Create_stagefile .stage/binary_grub
fi

View File

@ -40,6 +40,18 @@ Create_lockfile .lock
# Checking stage file # Checking stage file
Check_stagefile .stage/binary_includes Check_stagefile .stage/binary_includes
# Check includes
if [ ! -d "${LIVE_INCLUDES}" ]
then
if [ -d ../"${LIVE_INCLUDES}" ]
then
LIVE_INCLUDES="../${LIVE_INCLUDES}"
else
Echo_error "user specified includes not accessible in ${LIVE_INCLUDES}"
exit 1
fi
fi
if ls "${LIVE_INCLUDES}"/common/* &> /dev/null if ls "${LIVE_INCLUDES}"/common/* &> /dev/null
then then
cd "${LIVE_INCLUDES}"/common cd "${LIVE_INCLUDES}"/common

View File

@ -75,8 +75,16 @@ do
# Create image # Create image
if [ "${LIVE_ARCHITECTURE}" = "amd64" ] || [ "${LIVE_ARCHITECTURE}" = "i386" ] if [ "${LIVE_ARCHITECTURE}" = "amd64" ] || [ "${LIVE_ARCHITECTURE}" = "i386" ]
then then
#Chroot "${LH_GENISOIMAGE} -A \"Debian Live\" -p \"Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org\" -publisher \"Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org\" -o binary.iso -r -J -l -V \"${LIVE_ISO_VOLUME}\" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table binary" case "${LIVE_BOOTLOADER}" in
Chroot "${LH_GENISOIMAGE} -o binary.iso -r -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table binary" grub)
Chroot "${LH_GENISOIMAGE} -o binary.iso -r -J -l -b boot/grub/stage2_eltorito -m boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table binary"
;;
syslinux)
#Chroot "${LH_GENISOIMAGE} -A \"Debian Live\" -p \"Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org\" -publisher \"Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org\" -o binary.iso -r -J -l -V \"${LIVE_ISO_VOLUME}\" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table binary"
Chroot "${LH_GENISOIMAGE} -o binary.iso -r -J -l -b isolinux/isolinux.bin -m isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table binary"
;;
esac
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

View File

@ -24,6 +24,8 @@ Arguments "${@}"
# Reading configuration files # Reading configuration files
Read_conffile config/common Read_conffile config/common
Read_conffile config/bootstrap
Read_conffile config/chroot
Read_conffile config/image Read_conffile config/image
Set_defaults Set_defaults

View File

@ -25,6 +25,7 @@ Arguments "${@}"
# Reading configuration files # Reading configuration files
Read_conffile config/common Read_conffile config/common
Read_conffile config/bootstrap Read_conffile config/bootstrap
Read_conffile config/chroot
Read_conffile config/image Read_conffile config/image
Set_defaults Set_defaults

View File

@ -54,7 +54,7 @@ do
mv binary "`basename ${LIVE_SERVER_PATH}`" mv binary "`basename ${LIVE_SERVER_PATH}`"
cd .. cd ..
tar cfz binary-net.tar.gz "${OLDPWD}/`basename ${LIVE_SERVER_PATH}`" "${OLDPWD}/tftpboot" tar cfz binary-net.tar.gz "`basename ${OLDPWD}`/`basename ${LIVE_SERVER_PATH}`" "`basename ${OLDPWD}`/tftpboot"
mv binary-net.tar.gz "${OLDPWD}" mv binary-net.tar.gz "${OLDPWD}"
cd "${OLDPWD}" cd "${OLDPWD}"

View File

@ -103,11 +103,7 @@ case "${LIVE_FILESYSTEM}" in
rm -rf binary/casper/filesystem.dir rm -rf binary/casper/filesystem.dir
fi fi
cd chroot mv chroot/chroot binary/casper/filesystem.dir
find . | cpio -pumd ../binary/casper/filesystem.dir
cd "${OLDPWD}"
rm -rf chroot/chroot
;; ;;
squashfs) squashfs)

View File

@ -47,8 +47,20 @@ then
exit 0 exit 0
fi fi
if [ "${LIVE_SYSLINUX}" = "enabled" ] if [ "${LIVE_BOOTLOADER}" = "syslinux" ]
then then
# Check templates
if [ ! -d "${LIVE_TEMPLATES}" ]
then
if [ -d ../"${LIVE_TEMPLATES}" ]
then
LIVE_TEMPLATES="../${LIVE_TEMPLATES}"
else
Echo_error "user specified templates not accessible in ${LIVE_TEMPLATES}"
exit 1
fi
fi
if [ ! -f chroot/usr/bin/syslinux ] if [ ! -f chroot/usr/bin/syslinux ]
then then
PACKAGES="${PACKAGES} syslinux" PACKAGES="${PACKAGES} syslinux"
@ -121,10 +133,10 @@ then
if [ "${LIVE_BINARY_IMAGE}" = "iso" ] if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
then then
DEFAULT_FLAVOUR="`echo ${LIVE_KERNEL_FLAVOUR} | awk '{ print $1 }'`" DEFAULT_FLAVOUR="`echo ${LIVE_KERNEL_FLAVOUR} | awk '{ print $1 }'`"
LINUX="label linux\n kernel /`basename ${DESTDIR}`/`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n append initrd=/`basename ${DESTDIR}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND" LINUX="label LIVE\n kernel /`basename ${DESTDIR}`/`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n append initrd=/`basename ${DESTDIR}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
else else
DEFAULT_FLAVOUR="`echo ${LIVE_KERNEL_FLAVOUR} | awk '{ print $1 }'`" DEFAULT_FLAVOUR="`echo ${LIVE_KERNEL_FLAVOUR} | awk '{ print $1 }'`"
LINUX="label linux\n kernel `basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n append initrd=initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND" LINUX="label LIVE\n kernel `basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n append initrd=initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
fi fi
if [ "`echo ${LIVE_KERNEL_FLAVOUR} | wc -w`" -gt "1" ] if [ "`echo ${LIVE_KERNEL_FLAVOUR} | wc -w`" -gt "1" ]
@ -135,16 +147,16 @@ then
then then
if [ "${LIVE_BINARY_IMAGE}" = "iso" ] if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
then then
LINUX="label linux-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n kernel /`basename ${DESTDIR}`/`basename ${KERNEL}`\n append initrd=/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND" LINUX="label LIVE-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n kernel /`basename ${DESTDIR}`/`basename ${KERNEL}`\n append initrd=/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
else else
LINUX="label linux-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n kernel `basename ${KERNEL}`\n append initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND" LINUX="label LIVE-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n kernel `basename ${KERNEL}`\n append initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
fi fi
else else
if [ "${LIVE_BINARY_IMAGE}" = "iso" ] if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
then then
LINUX="${LINUX}\nlabel linux-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n kernel /`basename ${DESTDIR}`/`basename ${KERNEL}`\n append initrd=/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND" LINUX="${LINUX}\nlabel LIVE-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n kernel /`basename ${DESTDIR}`/`basename ${KERNEL}`\n append initrd=/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
else else
LINUX="${LINUX}\nlabel linux-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n kernel `basename ${KERNEL}`\n append initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND" LINUX="${LINUX}\nlabel LIVE-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n kernel `basename ${KERNEL}`\n append initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
fi fi
fi fi
done done
@ -178,7 +190,7 @@ then
fi fi
# Configure syslinux templates # Configure syslinux templates
sed -i -e "s#LIVE_KERNEL#${LINUX}#" -e "s#LIVE_MEMTEST#${MEMTEST}#" binary/isolinux/isolinux.cfg sed -i -e "s#LIVE_KERNEL_LIVE#${LINUX}#" -e "s#LIVE_KERNEL_INSTALL#${LIVE_KERNEL_INSTALL}#" -e "s#LIVE_MEMTEST#${MEMTEST}#" binary/isolinux/isolinux.cfg
sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" binary/isolinux/isolinux.cfg sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" binary/isolinux/isolinux.cfg
sed -i -e "s/LIVE_DATE/`date +%Y%m%d`/" 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}/" binary/isolinux/f10.txt sed -i -e "s/LIVE_VERSION/${VERSION}/" binary/isolinux/f10.txt
@ -195,12 +207,12 @@ then
mv "${DESTDIR}"/vmlinuz-*-${FLAVOUR} "${DESTDIR}"/vmlinuz${NUMBER} mv "${DESTDIR}"/vmlinuz-*-${FLAVOUR} "${DESTDIR}"/vmlinuz${NUMBER}
mv "${DESTDIR}"/initrd.img-*-${FLAVOUR} "${DESTDIR}"/initrd${NUMBER}.img mv "${DESTDIR}"/initrd.img-*-${FLAVOUR} "${DESTDIR}"/initrd${NUMBER}.img
sed -i -e "s/linux.*-${FLAVOUR}/linux${NUMBER}/g" -e "s/vmlinuz-.*-${FLAVOUR}/vmlinuz${NUMBER}/g" -e "s/initrd.img-.*-${FLAVOUR}/initrd${NUMBER}.img/g" binary/isolinux/isolinux.cfg sed -i -e "s/LIVE.*-${FLAVOUR}/live${NUMBER}/g" -e "s/vmlinuz-.*-${FLAVOUR}/vmlinuz${NUMBER}/g" -e "s/initrd.img-.*-${FLAVOUR}/initrd${NUMBER}.img/g" -e "s/LIVE/live/" binary/isolinux/isolinux.cfg
done done
else else
mv "${DESTDIR}"/vmlinuz-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR}"/vmlinuz mv "${DESTDIR}"/vmlinuz-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR}"/vmlinuz
mv "${DESTDIR}"/initrd.img-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR}"/initrd.img mv "${DESTDIR}"/initrd.img-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR}"/initrd.img
sed -i -e "s/linux.*-${LIVE_KERNEL_FLAVOUR}/linux/g" -e "s/vmlinuz-.*-${LIVE_KERNEL_FLAVOUR}/vmlinuz/g" -e "s/initrd.img-.*-${LIVE_KERNEL_FLAVOUR}/initrd.img/g" binary/isolinux/isolinux.cfg sed -i -e "s/LIVE.*-${LIVE_KERNEL_FLAVOUR}/live/g" -e "s/vmlinuz-.*-${LIVE_KERNEL_FLAVOUR}/vmlinuz/g" -e "s/initrd.img-.*-${LIVE_KERNEL_FLAVOUR}/initrd.img/g" -e "s/LIVE/live/" binary/isolinux/isolinux.cfg
fi fi
;; ;;
@ -221,7 +233,7 @@ then
fi fi
# Configure syslinux templates # Configure syslinux templates
sed -i -e "s#LIVE_KERNEL#${LINUX}#" -e "s#LIVE_MEMTEST#${MEMTEST}#" tftpboot/pxelinux.cfg/default sed -i -e "s#LIVE_KERNEL_LIVE#${LINUX}#" -e "s#LIVE_KERNEL_INSTALL#${LIVE_KERNEL_INSTALL}#" -e "s#LIVE_MEMTEST#${MEMTEST}#" 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_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 +%Y%m%d`/" 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}/" tftpboot/pxelinux.cfg/f10.txt sed -i -e "s/LIVE_VERSION/${VERSION}/" tftpboot/pxelinux.cfg/f10.txt
@ -238,12 +250,12 @@ then
mv "${DESTDIR}"/vmlinuz-*-${FLAVOUR} "${DESTDIR}"/vmlinuz${NUMBER} mv "${DESTDIR}"/vmlinuz-*-${FLAVOUR} "${DESTDIR}"/vmlinuz${NUMBER}
mv "${DESTDIR}"/initrd.img-*-${FLAVOUR} "${DESTDIR}"/initrd${NUMBER}.img mv "${DESTDIR}"/initrd.img-*-${FLAVOUR} "${DESTDIR}"/initrd${NUMBER}.img
sed -i -e "s/linux.*-${FLAVOUR}/linux${NUMBER}/g" -e "s/vmlinuz-.*-${FLAVOUR}/vmlinuz${NUMBER}/g" -e "s/initrd.img-.*-${FLAVOUR}/initrd${NUMBER}.img/g" tftpboot/pxelinux.cfg/default sed -i -e "s/LIVE.*-${FLAVOUR}/live${NUMBER}/g" -e "s/vmlinuz-.*-${FLAVOUR}/vmlinuz${NUMBER}/g" -e "s/initrd.img-.*-${FLAVOUR}/initrd${NUMBER}.img/g" -e "s/LIVE/live/" tftpboot/pxelive.cfg/default
done done
else else
mv "${DESTDIR}"/vmlinuz-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR}"/vmlinuz mv "${DESTDIR}"/vmlinuz-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR}"/vmlinuz
mv "${DESTDIR}"/initrd.img-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR}"/initrd.img mv "${DESTDIR}"/initrd.img-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR}"/initrd.img
sed -i -e "s/linux.*-${LIVE_KERNEL_FLAVOUR}/linux/g" -e "s/vmlinuz-.*-${LIVE_KERNEL_FLAVOUR}/vmlinuz/g" -e "s/initrd.img-.*-${LIVE_KERNEL_FLAVOUR}/initrd.img/g" tftpboot/pxelinux.cfg/default sed -i -e "s/LIVE.*-${LIVE_KERNEL_FLAVOUR}/live/g" -e "s/vmlinuz-.*-${LIVE_KERNEL_FLAVOUR}/vmlinuz/g" -e "s/initrd.img-.*-${LIVE_KERNEL_FLAVOUR}/initrd.img/g" -e "s/LIVE/live/" tftpboot/pxelinux.cfg/default
fi fi
;; ;;
@ -263,7 +275,7 @@ then
fi fi
# Configure syslinux templates # Configure syslinux templates
sed -i -e "s#LIVE_KERNEL#${LINUX}#" -e "s#LIVE_MEMTEST#${MEMTEST}#" binary/syslinux.cfg sed -i -e "s#LIVE_KERNEL_LIVE#${LINUX}#" -e "s#LIVE_KERNEL_INSTALL#${LIVE_KERNEL_INSTALL}#" -e "s#LIVE_MEMTEST#${MEMTEST}#" binary/syslinux.cfg
sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" binary/syslinux.cfg sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" binary/syslinux.cfg
sed -i -e "s/LIVE_DATE/`date +%Y%m%d`/" binary/f1.txt sed -i -e "s/LIVE_DATE/`date +%Y%m%d`/" binary/f1.txt
sed -i -e "s/LIVE_VERSION/${VERSION}/" binary/f10.txt sed -i -e "s/LIVE_VERSION/${VERSION}/" binary/f10.txt
@ -280,12 +292,12 @@ then
mv "${DESTDIR}"/vmlinuz-*-${FLAVOUR} "${DESTDIR}"/vmlinuz${NUMBER} mv "${DESTDIR}"/vmlinuz-*-${FLAVOUR} "${DESTDIR}"/vmlinuz${NUMBER}
mv "${DESTDIR}"/initrd.img-*-${FLAVOUR} "${DESTDIR}"/initrd${NUMBER}.img mv "${DESTDIR}"/initrd.img-*-${FLAVOUR} "${DESTDIR}"/initrd${NUMBER}.img
sed -i -e "s/linux.*-${FLAVOUR}/linux${NUMBER}/g" -e "s/vmlinuz-.*-${FLAVOUR}/vmlinuz${NUMBER}/g" -e "s/initrd.img-.*-${FLAVOUR}/initrd${NUMBER}.img/g" binary/syslinux.cfg sed -i -e "s/LIVE.*-${FLAVOUR}/live${NUMBER}/g" -e "s/vmlinuz-.*-${FLAVOUR}/vmlinuz${NUMBER}/g" -e "s/initrd.img-.*-${FLAVOUR}/initrd${NUMBER}.img/g" -e "s/LIVE/live/" binary/syslinux.cfg
done done
else else
mv "${DESTDIR}"/vmlinuz-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR}"/vmlinuz mv "${DESTDIR}"/vmlinuz-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR}"/vmlinuz
mv "${DESTDIR}"/initrd.img-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR}"/initrd.img mv "${DESTDIR}"/initrd.img-*-${LIVE_KERNEL_FLAVOUR} "${DESTDIR}"/initrd.img
sed -i -e "s/linux.*-${LIVE_KERNEL_FLAVOUR}/linux/g" -e "s/vmlinuz-.*-${LIVE_KERNEL_FLAVOUR}/vmlinuz/g" -e "s/initrd.img-.*-${LIVE_KERNEL_FLAVOUR}/initrd.img/g" binary/syslinux.cfg sed -i -e "s/LIVE.*-${LIVE_KERNEL_FLAVOUR}/live/g" -e "s/vmlinuz-.*-${LIVE_KERNEL_FLAVOUR}/vmlinuz/g" -e "s/initrd.img-.*-${LIVE_KERNEL_FLAVOUR}/initrd.img/g" -e "s/LIVE/live/" binary/syslinux.cfg
fi fi
;; ;;
esac esac

View File

@ -60,7 +60,12 @@ do
PACKAGES="${PACKAGES} parted" PACKAGES="${PACKAGES} parted"
fi fi
if [ ! -f chroot/usr/bin/syslinux ] if [ "${LIVE_BOOTLOADER}" = "grub" ] && [ ! -f chroot/usr/sbin/grub ]
then
PACKAGES="${PACKAGES} grub"
fi
if [ "${LIVE_BOOTLOADER}" = "syslinux" ] && [ ! -f chroot/usr/bin/syslinux ]
then then
PACKAGES="${PACKAGES} syslinux" PACKAGES="${PACKAGES} syslinux"
fi fi
@ -104,7 +109,17 @@ do
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 chroot/usr/lib/syslinux/mbr.bin > ${FREELO}
case "${LIVE_BOOTLOADER}" in
grub)
Chroot "grub-install --no-floppy ${FREELO}"
;;
syslinux)
cat chroot/usr/lib/syslinux/mbr.bin > ${FREELO}
;;
esac
${LH_LOSETUP} -d ${FREELO} ${LH_LOSETUP} -d ${FREELO}
lh_losetup $FREELO binary.img 1 lh_losetup $FREELO binary.img 1

View File

@ -22,14 +22,13 @@ USAGE="${PROGRAM} [--force]"
Arguments "${@}" Arguments "${@}"
if [ "${FORCE}" = "true" ] # Starting helper
then Echo_debug "Init ${PROGRAM}"
OPTIONS="${OPTIONS} --force"
fi
# Reading configuration files # Reading configuration files
Read_conffile config/common Read_conffile config/common
Set_defaults Set_defaults
# Bootstrapping system # Bootstrapping system
lh_bootstrap_"${LH_BOOTSTRAP}" "${OPTIONS}" lh_bootstrap_cdebootstrap "${@}"
lh_bootstrap_debootstrap "${@}"

View File

@ -25,11 +25,19 @@ Arguments "${@}"
# Ensure that a system is built as root # Ensure that a system is built as root
lh_testroot lh_testroot
# Starting helper
Echo_debug "Init ${PROGRAM}"
# Reading configuration files # Reading configuration files
Read_conffile config/common Read_conffile config/common
Read_conffile config/bootstrap Read_conffile config/bootstrap
Set_defaults Set_defaults
if [ "${LH_BOOTSTRAP}" != "cdebootstrap" ]
then
exit 0
fi
# Checking stage file # Checking stage file
Check_stagefile .stage/bootstrap Check_stagefile .stage/bootstrap
@ -63,11 +71,36 @@ else
CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --flavour=minimal" CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --flavour=minimal"
fi fi
if [ "${DEBUG}" = "true" ]
then
CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --debug"
fi
if [ "${QUIET}" = "true" ]
then
CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --quiet"
fi
if [ "${VERBOSE}" = "true" ]
then
CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --verbose"
fi
if [ -x "/usr/bin/cdebootstrap" ] if [ -x "/usr/bin/cdebootstrap" ]
then then
if [ "${LH_CACHE}" = "enabled" ] if [ "${LH_CACHE}" = "enabled" ]
then then
# Restore old cache # Restore old cache
if [ -d cache/chroot_bootstrap ]
then
cp -a cache/chroot_bootstrap/* chroot
# Creating stage file
Create_stagefile .stage/bootstrap
exit 0
fi
if [ -d cache/bootstrap ] if [ -d cache/bootstrap ]
then then
mkdir -p chroot/var/cache/bootstrap mkdir -p chroot/var/cache/bootstrap
@ -107,6 +140,17 @@ then
rm -rf chroot/var/cache/bootstrap rm -rf chroot/var/cache/bootstrap
fi fi
# Saving new cache
if [ "${LH_CACHE}" = "enabled" ]
then
if [ -d cache/chroot_bootstrap ]
then
rm -rf cache/chroot_bootstrap
fi
cp -a chroot cache/chroot_bootstrap
fi
# Creating stage file # Creating stage file
Create_stagefile .stage/bootstrap Create_stagefile .stage/bootstrap
else else

View File

@ -25,11 +25,19 @@ Arguments "${@}"
# Ensure that a system is built as root # Ensure that a system is built as root
lh_testroot lh_testroot
# Starting helper
Echo_debug "Init ${PROGRAM}"
# Reading configuration files # Reading configuration files
Read_conffile config/common Read_conffile config/common
Read_conffile config/bootstrap Read_conffile config/bootstrap
Set_defaults Set_defaults
if [ "${LH_BOOTSTRAP}" != "debootstrap" ]
then
exit 0
fi
# Checking stage file # Checking stage file
Check_stagefile .stage/bootstrap Check_stagefile .stage/bootstrap
@ -56,11 +64,26 @@ then
LIVE_DEBOOTSTRAP_SCRIPT="/usr/lib/debootstrap/scripts/${LIVE_BOOTSTRAP_CONFIG}" LIVE_DEBOOTSTRAP_SCRIPT="/usr/lib/debootstrap/scripts/${LIVE_BOOTSTRAP_CONFIG}"
fi fi
if [ "${VERBOSE}" = "true" ]
then
DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --verbose"
fi
if [ -x "/usr/sbin/debootstrap" ] if [ -x "/usr/sbin/debootstrap" ]
then then
if [ "${LH_CACHE}" = "enabled" ] if [ "${LH_CACHE}" = "enabled" ]
then then
# Restore old cache # Restore old cache
if [ -d cache/chroot_bootstrap ]
then
cp -a cache/chroot_bootstrap/* chroot
# Creating stage file
Create_stagefile .stage/bootstrap
exit 0
fi
if [ -d cache/bootstrap ] if [ -d cache/bootstrap ]
then then
mkdir -p chroot/var/cache/apt/archives mkdir -p chroot/var/cache/apt/archives
@ -91,6 +114,17 @@ then
# Removing bootstrap cache # Removing bootstrap cache
rm -rf chroot/var/cache/apt/archives/*.deb rm -rf chroot/var/cache/apt/archives/*.deb
# Saving new cache
if [ "${LH_CACHE}" = "enabled" ]
then
if [ -d cache/chroot_bootstrap ]
then
rm -rf cache/chroot_bootstrap
fi
cp -a chroot cache/chroot_bootstrap
fi
# Creating stage file # Creating stage file
Create_stagefile .stage/bootstrap Create_stagefile .stage/bootstrap
else else

View File

@ -22,19 +22,14 @@ USAGE="${PROGRAM} [--force]"
Arguments "${@}" Arguments "${@}"
if [ "${FORCE}" = "true" ]
then
OPTIONS="${OPTIONS} --force"
fi
# Bootstrapping system # Bootstrapping system
lh_bootstrap "${OPTIONS}" lh_bootstrap "${@}"
# Customizing chroot # Customizing chroot
lh_chroot "${OPTIONS}" lh_chroot "${@}"
# Building binary image # Building binary image
lh_binary "${OPTIONS}" lh_binary "${@}"
# Building source image # Building source image
lh_source "${OPTIONS}" lh_source "${@}"

View File

@ -22,49 +22,44 @@ USAGE="${PROGRAM} [--force]"
Arguments "${@}" Arguments "${@}"
if [ "${FORCE}" = "true" ]
then
OPTIONS="${OPTIONS} --force"
fi
# Reading configuration files # Reading configuration files
Read_conffile config/common Read_conffile config/common
Read_conffile config/chroot Read_conffile config/chroot
Set_defaults Set_defaults
# Configuring chroot # Configuring chroot
lh_chroot_proc install "${OPTIONS}" lh_chroot_proc install "${@}"
lh_chroot_sysfs install "${OPTIONS}" lh_chroot_sysfs install "${@}"
lh_chroot_debianchroot install "${OPTIONS}" lh_chroot_debianchroot install "${@}"
lh_chroot_sysvrc install "${OPTIONS}" lh_chroot_sysvrc install "${@}"
lh_chroot_hosts install "${OPTIONS}" lh_chroot_hosts install "${@}"
lh_chroot_resolv install "${OPTIONS}" lh_chroot_resolv install "${@}"
lh_chroot_apt install "${OPTIONS}" lh_chroot_apt install "${@}"
lh_chroot_sources install "${OPTIONS}" lh_chroot_sources install "${@}"
lh_chroot_linuximage install "${OPTIONS}" lh_chroot_linuximage install "${@}"
# Customizing chroot # Customizing chroot
lh_chroot_tasks "${OPTIONS}" lh_chroot_tasks "${@}"
lh_chroot_packageslists "${OPTIONS}" lh_chroot_packageslists "${@}"
lh_chroot_packages "${OPTIONS}" lh_chroot_packages "${@}"
lh_chroot_localpackages "${OPTIONS}" lh_chroot_localpackages "${@}"
lh_chroot_localpackageslists "${OPTIONS}" lh_chroot_localpackageslists "${@}"
lh_chroot_localization "${OPTIONS}" lh_chroot_localization "${@}"
lh_chroot_hacks "${OPTIONS}" lh_chroot_hacks "${@}"
lh_chroot_localincludes "${OPTIONS}" lh_chroot_localincludes "${@}"
lh_chroot_sysvinit "${OPTIONS}" lh_chroot_sysvinit "${@}"
lh_chroot_hooks "${OPTIONS}" lh_chroot_hooks "${@}"
lh_chroot_localhooks "${OPTIONS}" lh_chroot_localhooks "${@}"
lh_chroot_symlinks "${OPTIONS}" lh_chroot_symlinks "${@}"
lh_chroot_interactive "${OPTIONS}" lh_chroot_interactive "${@}"
# Deconfiguring chroot # Deconfiguring chroot
lh_chroot_linuximage remove "${OPTIONS}" lh_chroot_linuximage remove "${@}"
lh_chroot_sources remove "${OPTIONS}" lh_chroot_sources remove "${@}"
lh_chroot_apt remove "${OPTIONS}" lh_chroot_apt remove "${@}"
lh_chroot_resolv remove "${OPTIONS}" lh_chroot_resolv remove "${@}"
lh_chroot_hosts remove "${OPTIONS}" lh_chroot_hosts remove "${@}"
lh_chroot_sysvrc remove "${OPTIONS}" lh_chroot_sysvrc remove "${@}"
lh_chroot_debianchroot remove "${OPTIONS}" lh_chroot_debianchroot remove "${@}"
lh_chroot_sysfs remove "${OPTIONS}" lh_chroot_sysfs remove "${@}"
lh_chroot_proc remove "${OPTIONS}" lh_chroot_proc remove "${@}"

View File

@ -133,21 +133,21 @@ case "${1}" in
then then
case "${LH_APT}" in case "${LH_APT}" in
apt|apt-get) apt|apt-get)
echo "APT::Get::AllowUnauthenticated \"0\";" >> chroot/etc/apt/apt.conf echo "APT::Get::AllowUnauthenticated \"true\";" >> chroot/etc/apt/apt.conf
;; ;;
aptitude) aptitude)
echo "APT::Get::AllowUnauthenticated \"0\";" > chroot/etc/apt/apt.conf.d/secure echo "APT::Get::AllowUnauthenticated \"true\";" > chroot/etc/apt/apt.conf.d/secure
;; ;;
esac esac
else else
case "${LH_APT}" in case "${LH_APT}" in
apt|apt-get) apt|apt-get)
echo "APT::Get::AllowUnauthenticated \"1\";" >> chroot/etc/apt/apt.conf echo "APT::Get::AllowUnauthenticated \"false\";" >> chroot/etc/apt/apt.conf
;; ;;
aptitude) aptitude)
echo "APT::Get::AllowUnauthenticated \"1\";" > chroot/etc/apt/apt.conf.d/secure echo "APT::Get::AllowUnauthenticated \"false\";" > chroot/etc/apt/apt.conf.d/secure
;; ;;
esac esac
fi fi

View File

@ -57,7 +57,7 @@ then
Chroot "/root/`basename ${HOOK}`" Chroot "/root/`basename ${HOOK}`"
# Removing hook # Removing hook
rm -f chroot/"`basename ${HOOK}`" rm -f chroot/root/"`basename ${HOOK}`"
done done
# Creating stage file # Creating stage file

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# lh_chroot_localpackageslists(1) - install local packages into chroot # lh_chroot_localpackageslists(1) - install local packages lists into chroot
# Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org> # Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org>
# #
# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING. # live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.

View File

@ -48,7 +48,7 @@ case "${1}" in
fi fi
# Mounting /sys # Mounting /sys
mount sys-live -t sysfs chroot/sys mount sysfs-live -t sysfs chroot/sys
# Creating stage file # Creating stage file
Create_stagefile .stage/chroot_sysfs Create_stagefile .stage/chroot_sysfs

View File

@ -22,9 +22,6 @@ USAGE="${PROGRAM} [all|cache|chroot|binary|lock|purge|stage|source]"
Arguments "${@}" Arguments "${@}"
# Ensure that a system is built as root
lh_testroot
# Reading configuration files # Reading configuration files
Read_conffile config/common Read_conffile config/common
Set_defaults Set_defaults
@ -36,6 +33,12 @@ case "${1}" in
"${0}" lock "${0}" lock
"${0}" stage "${0}" stage
"${0}" source "${0}" source
if [ -d chroot ]
then
mkdir -p .stage
touch .stage/bootstrap
fi
;; ;;
cache) cache)
@ -52,6 +55,13 @@ case "${1}" in
rm -rf chroot rm -rf chroot
if [ "${PURGE}" != "true" ] && [ -d cache/chroot_bootstrap ]
then
cp -a cache/chroot_bootstrap chroot
mkdir -p .stage
touch .stage/bootstrap
fi
rm -f .stage/chroot* rm -f .stage/chroot*
;; ;;
@ -72,7 +82,7 @@ case "${1}" in
;; ;;
purge) purge)
"${0}" all PURGE="true" "${0}" all
"${0}" cache "${0}" cache
;; ;;

View File

@ -167,7 +167,7 @@ LIVE_DISTRIBUTION_CONFIG="${LIVE_DISTRIBUTION_CONFIG}"
# \$LIVE_BOOTSTRAP_FLAVOUR: select the flavour to use # \$LIVE_BOOTSTRAP_FLAVOUR: select the flavour to use
# (Default: ${LIVE_BOOTSTRAP_FLAVOUR}) # (Default: ${LIVE_BOOTSTRAP_FLAVOUR})
LIVE_BOOTSTRAP_FLAVOUR="${LIVE_BOOTSTRA_PFLAVOUR}" LIVE_BOOTSTRAP_FLAVOUR="${LIVE_BOOTSTRAP_FLAVOUR}"
# \$LIVE_MIRROR_BUILD: set the mirror to fetch packages from # \$LIVE_MIRROR_BUILD: set the mirror to fetch packages from
# (Default: ${LIVE_MIRROR_BUILD}) # (Default: ${LIVE_MIRROR_BUILD})
@ -234,9 +234,13 @@ LIVE_SERVER_PATH="${LIVE_SERVER_PATH}"
# (Default: ${LH_SOURCE}) # (Default: ${LH_SOURCE})
LIVE_SOURCE="${LIVE_SOURCE}" LIVE_SOURCE="${LIVE_SOURCE}"
# \$LIVE_SYSLINUX: set syslinux option # \$LIVE_BOOTLOADER: set bootloader
# (Default: ${LIVE_SYSLINUX}) # (Default: ${LIVE_BOOTLOADER})
LIVE_SYSLINUX="${LIVE_SYSLINUX}" LIVE_BOOTLOADER="${LIVE_BOOTLOADER}"
# \$LIVE_GRUB_SPLASH: set custom grub splash
# (Default: empty)
LIVE_GRUB_SPLASH="${LIVE_GRUB_SPLASH}"
# \$LIVE_SYSLINUX_SPLASH: set custom syslinux splash # \$LIVE_SYSLINUX_SPLASH: set custom syslinux splash
# (Default: empty) # (Default: empty)

View File

@ -22,33 +22,29 @@ USAGE="${PROGRAM} [--force]"
Arguments "${@}" Arguments "${@}"
if [ "${FORCE}" = "true" ]
then
OPTIONS="${OPTIONS} --force"
fi
# Reading configuration files # Reading configuration files
Read_conffile config/common Read_conffile config/common
Read_conffile config/image Read_conffile config/image
Set_defaults Set_defaults
# Enabling network in chroot # Enabling network in chroot
lh_chroot_hosts install "${OPTIONS}" lh_chroot_hosts install "${@}"
lh_chroot_resolv install "${OPTIONS}" lh_chroot_resolv install "${@}"
lh_chroot_sources install "${OPTIONS}" lh_chroot_sources install "${@}"
# Preparing images # Preparing images
lh_source_config "${OPTIONS}" lh_source_config "${@}"
lh_source_download "${OPTIONS}" lh_source_download "${@}"
lh_source_md5sum "${OPTIONS}" lh_source_md5sum "${@}"
# Building images # Building images
lh_source_generic "${OPTIONS}" lh_source_generic "${@}"
lh_source_iso "${OPTIONS}" lh_source_hdd "${@}"
lh_source_net "${OPTIONS}" lh_source_iso "${@}"
lh_source_usb "${OPTIONS}" lh_source_net "${@}"
lh_source_usb "${@}"
# Deconfiguring chroot # Deconfiguring chroot
rm -f .stage/chroot_sources rm -f .stage/chroot_sources
lh_chroot_resolv remove "${OPTIONS}" lh_chroot_resolv remove "${@}"
lh_chroot_hosts remove "${OPTIONS}" lh_chroot_hosts remove "${@}"

View File

@ -27,6 +27,6 @@ set -e
# Checking user account # Checking user account
if [ "`id -u`" -ne "0" ] if [ "`id -u`" -ne "0" ]
then then
echo "E: need root privileges" Echo_error "need root privileges"
exit 1 exit 1
fi fi

View File

@ -31,13 +31,13 @@ done
# Set static variables # Set static variables
PROGRAM="`basename ${0}`" PROGRAM="`basename ${0}`"
DESCRIPTION="utility to build Debian Live systems" DESCRIPTION="utility to build Debian Live systems"
USAGE="${PROGRAM} [config] [--apt apt|aptitude] [--apt-ftpproxy URL] [--apt-httpproxy URL] [--apt-generic enabled|disabled] [--apt-pdiffs enabled|disabled] [--apt-recommends enabled|disabled] [--apt-secure enabled|disabled] [--bootstrap cdebootstrap|deboostrap] [--cache enabled|disabled] [--debconf-frontend dialog|readline|noninteractive] [--debconf-priority low|medium|high|critical] [--genisoimage genisoimage|mkisofs] [--losetup losetup|losetup.org] [-r|--root DIRECTORY] [-a|--architecture ARCHITECTURE] [-d|--distribution testing|unstable|etch|sid] [--distribution-config DIRECTORY] [-f|--bootstrap-flavour minimal|standard] [-m|--mirror-build URL] [--mirror-build-security URL] [--mirror-image URL] [--mirror-image-security URL] [--sections SECTION|\"SECTIONS\"] [--interactive shell|x11|xnest] [-k|--kernel-flavour FLAVOUR] [--kernel-packages PACKAGES] [-l|--language LANGUAGE] [--packages PACKAGE|\"PACKAGES\"] [-p|--packages-lists LIST|\"LISTS\"] [--tasks TASK|\"TASKS\"] [--security enabled|disabled] [--symlinks enabled|disabled] [--sysvinit enabled|disabled] [--bootappend KERNEL_PARAMETER|\"KERNEL_PARAMETERS\"] [-e|--encryption ALGORITHM] [--username NAME] [--hostname NAME] [--filesystem ext2|plain|squashfs] [--memtest86 enabled|disabled] [--iso-volume STRING] [--server-address HOSTNAME|IP] [--server-path DIRECTORY] [--source enabled|disabled] [--syslinux enabled|disabled] [--syslinux-splash FILE] [-b|--binary-image hdd|iso|usb|net] [-s|--source-image generic|hdd|iso|usb|net] [--includes DIRECTORY] [--templates DIRECTORY] [--force]" USAGE="${PROGRAM} [config] [--apt apt|aptitude] [--apt-ftpproxy URL] [--apt-httpproxy URL] [--apt-generic enabled|disabled] [--apt-pdiffs enabled|disabled] [--apt-recommends enabled|disabled] [--apt-secure enabled|disabled] [--bootstrap cdebootstrap|deboostrap] [--cache enabled|disabled] [--debconf-frontend dialog|readline|noninteractive] [--debconf-priority low|medium|high|critical] [--genisoimage genisoimage|mkisofs] [--losetup losetup|losetup.org] [-r|--root DIRECTORY] [-a|--architecture ARCHITECTURE] [-d|--distribution testing|unstable|etch|sid] [--distribution-config DIRECTORY] [-f|--bootstrap-flavour minimal|standard] [-m|--mirror-build URL] [--mirror-build-security URL] [--mirror-image URL] [--mirror-image-security URL] [--sections SECTION|\"SECTIONS\"] [--interactive shell|x11|xnest] [-k|--kernel-flavour FLAVOUR] [--kernel-packages PACKAGES] [-l|--language LANGUAGE] [--packages PACKAGE|\"PACKAGES\"] [-p|--packages-lists LIST|\"LISTS\"] [--tasks TASK|\"TASKS\"] [--security enabled|disabled] [--symlinks enabled|disabled] [--sysvinit enabled|disabled] [--bootappend KERNEL_PARAMETER|\"KERNEL_PARAMETERS\"] [-e|--encryption ALGORITHM] [--username NAME] [--hostname NAME] [--filesystem ext2|plain|squashfs] [--memtest86 enabled|disabled] [--iso-volume STRING] [--server-address HOSTNAME|IP] [--server-path DIRECTORY] [--source enabled|disabled] [--bootloader grub|syslinux] [--grub-splash FILE] [--syslinux-splash FILE] [-b|--binary-image hdd|iso|usb|net] [-s|--source-image generic|hdd|iso|usb|net] [--includes PATH] [--templates PATH] [--debug] [--force] [--quiet] [--verbose]"
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" HELP="Lists: gnome, gnome-core, gnome-desktop, gnome-full, gnome-junior, gnustep, kde, kde-core, kde-desktop, kde-extra, kde-full, kde-junior, mini, minimal, minimal-net, rescue, standard, standard-x11, xfce, xfce-desktop, xfce-junior"
Local_arguments () Local_arguments ()
{ {
ARGUMENTS="`getopt --longoptions apt:,apt-ftpproxy:,apt-httpproxy:,apt-generic:,apt-pdiffs:,apt-recommends:,apt-secure:,bootstrap:,cache:,debconf-frontend:,debconf-priority:,genisoimage:,losetup:,root:,architecture:,distribution:,distribution-config:,flavour:,mirror-local:,mirror-local-security:,mirror-generic:,mirror-generic-security:,sections:,interactive:,kernel:,kernel-packages:,language:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,bootappend:,encryption:,username:,hostname:,filesystem:,memtest86:,iso-volume:,server-address:,server-path:,source:,syslinux:,syslinux-splash:,binary-image:,binary-source:,includes:,templates:,help,usage,version,force --name=${PROGRAM} --options r: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:,apt-secure:,bootstrap:,cache:,debconf-frontend:,debconf-priority:,genisoimage:,losetup:,root:,architecture:,distribution:,distribution-config:,flavour:,mirror-local:,mirror-local-security:,mirror-generic:,mirror-generic-security:,sections:,interactive:,kernel:,kernel-packages:,language:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,bootappend:,encryption:,username:,hostname:,filesystem:,memtest86:,iso-volume:,server-address:,server-path:,source:,bootloader:,grub-splash:,syslinux-splash:,binary-image:,binary-source:,includes:,templates:,help,usage,version,force,debug,quiet,verbose --name=${PROGRAM} --options r:a:d:f:m:k:l:p:e:b:s:huv --shell sh -- "${@}"`"
if [ "${?}" != "0" ] if [ "${?}" != "0" ]
then then
@ -232,7 +232,11 @@ Local_arguments ()
LIVE_SOURCE="${2}"; shift 2 LIVE_SOURCE="${2}"; shift 2
;; ;;
--syslinux) --bootloader)
LIVE_BOOTLOADER="${2}"; shift 2
;;
--grub-splash)
LIVE_SYSLINUX="${2}"; shift 2 LIVE_SYSLINUX="${2}"; shift 2
;; ;;
@ -269,10 +273,22 @@ Local_arguments ()
Version; shift Version; shift
;; ;;
--debug)
DEBUG="true"; shift
;;
--force) --force)
FORCE="true"; shift FORCE="true"; shift
;; ;;
--quiet)
QUIET="true"; shift
;;
--verbose)
VERBOSE="true"; shift
;;
--) --)
shift; break shift; break
;; ;;
@ -304,17 +320,29 @@ Main ()
Local_arguments "${@}" Local_arguments "${@}"
# Initializing
lh_testroot
# Configuring (this is really shit!) # Configuring (this is really shit!)
LH_APT="${LH_APT}" LH_APT_FTPPROXY="${LH_APT_FTPPROXY}" LH_APT_HTTPPROXY="${LH_APT_HTTPPROXY}" LH_APT_GENERIC="${LH_APT_GENERIC}" LH_APT_PDIFFS="${LH_APT_PDIFFS}" LH_APT_RECOMMENDS="${LH_APT_RECOMMENDS}" LH_APT_SECURE="${LH_APT_SECURE}" LH_BOOTSTRAP="${LH_BOOTSTRAP}" LH_CACHE="${LH_CACHE}" LH_DEBCONF_FRONTEND="${LH_DEBCONF_FRONTEND}" LH_DEBCONF_PRIORITY="${LH_DEBCONF_PRIORITY}" LH_GENISOIMAGE="${LH_GENISOIMAGE}" LIVE_ROOT="${LIVE_ROOT}" LIVE_ARCHITECTURE="${LIVE_ARCHITECTURE}" LIVE_DISTRIBUTION="${LIVE_DISTRIBUTION}" LIVE_DISTRIBUTION_CONFIG="${LIVE_DISTRIBUTION_CONFIG}" LIVE_BOOTSTRAP_FLAVOUR="${LIVE_BOOTSTRAP_FLAVOUR}" LIVE_MIRROR_BUILD="${LIVE_MIRROR_BUILD}" LIVE_MIRROR_BUILD_SECURITY="${LIVE_MIRROR_BUILD_SECURITY}" LIVE_MIRROR_IMAGE="${LIVE_MIRROR_IMAGE}" LIVE_MIRROR_IMAGE_SECURITY="${LIVE_MIRROR_IMAGE_SECURITY}" LIVE_SECTIONS="${LIVE_SECTIONS}" LIVE_INTERACTIVE="${LIVE_INTERACTIVE}" LIVE_KERNEL_FLAVOUR="${LIVE_KERNEL_FLAVOUR}" LIVE_KERNEL_PACKAGES="${LIVE_KERNEL_PACKAGES}" LIVE_LANGUAGE="${LIVE_LANGUAGE}" LIVE_PACKAGES="${LIVE_PACKAGES}" LIVE_PACKAGES_LISTS="${LIVE_PACKAGES_LISTS}" LIVE_TASKS="${LIVE_TASKS}" LIVE_SECURITY="${LIVE_SECURITY}" LIVE_SYMLINKS="${LIVE_SYMLINKS}" LIVE_SYSVINIT="${LIVE_SYSVINIT}" LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND}" LIVE_ENCRYPTION="${LIVE_ENCRYPTION}" LIVE_USERNAME="${LIVE_USERNAME}" LIVE_HOSTNAME="${LIVE_HOSTNAME}" LIVE_FILESYSTEM="${LIVE_FILESYSTEM}" LIVE_MEMTEST86="${LIVE_MEMTEST86}" LIVE_ISO_VOLUME="${LIVE_ISO_VOLUME}" LIVE_SERVER_ADDRESS="${LIVE_SERVER_ADDRESS}" LIVE_SERVER_PATH="${LIVE_SERVER_PATH}" LIVE_SOURCE="${LIVE_SOURCE}" LIVE_SYSLINUX="${LIVE_SYSLINUX}" LIVE_SYSLINUX_SPLASH="${LIVE_SYSLINUX_SPLASH}" LIVE_BINARY_IMAGE="${LIVE_BINARY_IMAGE}" LIVE_SOURCE_IMAGE="${LIVE_SOURCE_IMAGE}" LIVE_INCLUDES="${LIVE_INCLUDES}" LIVE_TEMPLATES="${LIVE_TEMPLATES}" lh_config newconfig LH_APT="${LH_APT}" LH_APT_FTPPROXY="${LH_APT_FTPPROXY}" LH_APT_HTTPPROXY="${LH_APT_HTTPPROXY}" LH_APT_GENERIC="${LH_APT_GENERIC}" LH_APT_PDIFFS="${LH_APT_PDIFFS}" LH_APT_RECOMMENDS="${LH_APT_RECOMMENDS}" LH_APT_SECURE="${LH_APT_SECURE}" LH_BOOTSTRAP="${LH_BOOTSTRAP}" LH_CACHE="${LH_CACHE}" LH_DEBCONF_FRONTEND="${LH_DEBCONF_FRONTEND}" LH_DEBCONF_PRIORITY="${LH_DEBCONF_PRIORITY}" LH_GENISOIMAGE="${LH_GENISOIMAGE}" LIVE_ROOT="${LIVE_ROOT}" LIVE_ARCHITECTURE="${LIVE_ARCHITECTURE}" LIVE_DISTRIBUTION="${LIVE_DISTRIBUTION}" LIVE_DISTRIBUTION_CONFIG="${LIVE_DISTRIBUTION_CONFIG}" LIVE_BOOTSTRAP_FLAVOUR="${LIVE_BOOTSTRAP_FLAVOUR}" LIVE_MIRROR_BUILD="${LIVE_MIRROR_BUILD}" LIVE_MIRROR_BUILD_SECURITY="${LIVE_MIRROR_BUILD_SECURITY}" LIVE_MIRROR_IMAGE="${LIVE_MIRROR_IMAGE}" LIVE_MIRROR_IMAGE_SECURITY="${LIVE_MIRROR_IMAGE_SECURITY}" LIVE_SECTIONS="${LIVE_SECTIONS}" LIVE_INTERACTIVE="${LIVE_INTERACTIVE}" LIVE_KERNEL_FLAVOUR="${LIVE_KERNEL_FLAVOUR}" LIVE_KERNEL_PACKAGES="${LIVE_KERNEL_PACKAGES}" LIVE_LANGUAGE="${LIVE_LANGUAGE}" LIVE_PACKAGES="${LIVE_PACKAGES}" LIVE_PACKAGES_LISTS="${LIVE_PACKAGES_LISTS}" LIVE_TASKS="${LIVE_TASKS}" LIVE_SECURITY="${LIVE_SECURITY}" LIVE_SYMLINKS="${LIVE_SYMLINKS}" LIVE_SYSVINIT="${LIVE_SYSVINIT}" LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND}" LIVE_ENCRYPTION="${LIVE_ENCRYPTION}" LIVE_USERNAME="${LIVE_USERNAME}" LIVE_HOSTNAME="${LIVE_HOSTNAME}" LIVE_FILESYSTEM="${LIVE_FILESYSTEM}" LIVE_MEMTEST86="${LIVE_MEMTEST86}" LIVE_ISO_VOLUME="${LIVE_ISO_VOLUME}" LIVE_SERVER_ADDRESS="${LIVE_SERVER_ADDRESS}" LIVE_SERVER_PATH="${LIVE_SERVER_PATH}" LIVE_SOURCE="${LIVE_SOURCE}" LIVE_BOOTLOADER="${LIVE_BOOTLOADER}" LIVE_GRUB_SPLASH="${LIVE_GRUB_SPLASH}" LIVE_SYSLINUX_SPLASH="${LIVE_SYSLINUX_SPLASH}" LIVE_BINARY_IMAGE="${LIVE_BINARY_IMAGE}" LIVE_SOURCE_IMAGE="${LIVE_SOURCE_IMAGE}" LIVE_INCLUDES="${LIVE_INCLUDES}" LIVE_TEMPLATES="${LIVE_TEMPLATES}" lh_config newconfig
if [ "${DEBUG}" = "true" ]
then
OPTIONS="${OPTIONS} --debug"
fi
if [ "${FORCE}" = "true" ] if [ "${FORCE}" = "true" ]
then then
OPTIONS="${OPTIONS} --force" OPTIONS="${OPTIONS} --force"
fi fi
if [ "${QUIET}" = "true" ]
then
OPTIONS="${OPTIONS} --quiet"
fi
if [ "${VERBOSE}" = "true" ]
then
OPTIONS="${OPTIONS} --verbose"
fi
# Building # Building
if [ -z "${CONFIG}" ] if [ -z "${CONFIG}" ]
then then

View File

@ -10,9 +10,9 @@
set -e set -e
# Removing unused packages # Removing unused packages
apt-get remove --purge apt-utils aptitude libdb4.4 apt-get remove --purge --yes apt-utils aptitude
apt-get remove --purge man-db manpages info apt-get remove --purge --yes man-db manpages info
apt-get remove --purge ssl wget apt-get remove --purge --yes ssl wget
# Removing unused files # Removing unused files
rm -rf /usr/include/* rm -rf /usr/include/*

View File

@ -10,9 +10,9 @@
set -e set -e
# Removing unused packages # Removing unused packages
apt-get remove --purge apt-utils aptitude libdb4.4 apt-get remove --purge --yes apt-utils aptitude
apt-get remove --purge man-db manpages info apt-get remove --purge --yes man-db manpages info
apt-get remove --purge ssl wget apt-get remove --purge --yes ssl wget
# Removing unused files # Removing unused files
rm -rf /var/cache/man/* rm -rf /var/cache/man/*

View File

@ -1,4 +1,4 @@
# /usr/share/make-live/lists/gnome - package list for make-live(1) # /usr/share/live-helper/lists/gnome - package list for live-helper(7)
# Minimal # Minimal
eject file sudo vim-tiny eject file sudo vim-tiny
@ -13,5 +13,5 @@ desktop-base
rhythmbox synaptic rhythmbox synaptic
xorg xresprobe discover xorg xresprobe discover menu
alsa-base alsa-oss alsa-utils alsa-base alsa-oss alsa-utils

View File

@ -1,4 +1,4 @@
# /usr/share/make-live/lists/gnome-core - package list for make-live(1) # /usr/share/live-helper/lists/gnome-core - package list for live-helper(7)
# Minimal # Minimal
eject file sudo vim-tiny eject file sudo vim-tiny
@ -10,5 +10,5 @@ console-common kbd locales
gdm gnome-core gdm gnome-core
desktop-base desktop-base
xorg xresprobe discover xorg xresprobe discover menu
alsa-base alsa-oss alsa-utils alsa-base alsa-oss alsa-utils

View File

@ -1,4 +1,4 @@
# /usr/share/make-live/lists/gnome-full - package list for make-live(1) # /usr/share/live-helper/lists/gnome-full - package list for live-helper(7)
# Minimal # Minimal
eject file sudo vim-tiny eject file sudo vim-tiny
@ -10,5 +10,5 @@ console-common kbd locales
gdm gnome gdm gnome
desktop-base desktop-base
xorg xresprobe discover xorg xresprobe discover menu
alsa-base alsa-oss alsa-utils alsa-base alsa-oss alsa-utils

View File

@ -1,4 +1,4 @@
# /usr/share/make-live/lists/gnome - package list for make-live(1) # /usr/share/live-helper/lists/gnome - package list for live-helper(7)
# Minimal # Minimal
eject file sudo vim-tiny eject file sudo vim-tiny
@ -13,7 +13,7 @@ desktop-base
rhythmbox synaptic rhythmbox synaptic
xorg xresprobe discover xorg xresprobe discover menu
alsa-base alsa-oss alsa-utils alsa-base alsa-oss alsa-utils
# Debian Junior # Debian Junior

View File

@ -1,4 +1,4 @@
# /usr/share/make-live/lists/x11-core - package list for make-live(1) # /usr/share/live-helper/lists/gnustep - package list for live-helper(7)
# Minimal # Minimal
eject file sudo vim-tiny eject file sudo vim-tiny
@ -7,7 +7,7 @@ eject file sudo vim-tiny
console-common kbd locales console-common kbd locales
# X11 # X11
xorg xresprobe xorg xresprobe discover menu
# GNUstep # GNUstep
wdm wdm

View File

@ -1,4 +1,4 @@
# /usr/share/make-live/lists/kde - package list for make-live(1) # /usr/share/live-helper/lists/kde - package list for live-helper(7)
# Minimal # Minimal
eject file sudo vim-tiny eject file sudo vim-tiny
@ -10,5 +10,5 @@ console-common kbd locales
kde kdm kde kdm
desktop-base desktop-base
xorg xresprobe discover xorg xresprobe discover menu
alsa-base alsa-oss alsa-utils alsa-base alsa-oss alsa-utils

View File

@ -1,4 +1,4 @@
# /usr/share/make-live/lists/kde-core - package list for make-live(1) # /usr/share/live-helper/lists/kde-core - package list for live-helper(7)
# Minimal # Minimal
eject file sudo vim-tiny eject file sudo vim-tiny
@ -10,5 +10,5 @@ console-common kbd locales
kde-core kdm kde-core kdm
desktop-base desktop-base
xorg xresprobe discover xorg xresprobe discover menu
alsa-base alsa-oss alsa-utils alsa-base alsa-oss alsa-utils

View File

@ -1,4 +1,4 @@
# /usr/share/make-live/lists/kde-extra - package list for make-live(1) # /usr/share/live-helper/lists/kde-extra - package list for live-helper(7)
# Minimal # Minimal
eject file sudo vim-tiny eject file sudo vim-tiny
@ -10,7 +10,7 @@ console-common kbd locales
kde kdm kde kdm
desktop-base desktop-base
xorg xresprobe discover xorg xresprobe discover menu
alsa-base alsa-oss alsa-utils alsa-base alsa-oss alsa-utils
# KDE Full # KDE Full

View File

@ -1,4 +1,4 @@
# /usr/share/make-live/lists/kde-full - package list for make-live(1) # /usr/share/live-helper/lists/kde-full - package list for live-helper(7)
# Minimal # Minimal
eject file sudo vim-tiny eject file sudo vim-tiny
@ -10,7 +10,7 @@ console-common kbd locales
kde kdm kde kdm
desktop-base desktop-base
xorg xresprobe discover xorg xresprobe discover menu
alsa-base alsa-oss alsa-utils alsa-base alsa-oss alsa-utils
# KDE Full # KDE Full

View File

@ -1,4 +1,4 @@
# /usr/share/make-live/lists/kde - package list for make-live(1) # /usr/share/live-helper/lists/kde - package list for live-helper(7)
# Minimal # Minimal
eject file sudo vim-tiny eject file sudo vim-tiny
@ -10,7 +10,7 @@ console-common kbd locales
kde kdm kde kdm
desktop-base desktop-base
xorg xresprobe discover xorg xresprobe discover menu
alsa-base alsa-oss alsa-utils alsa-base alsa-oss alsa-utils
# Debian Junior # Debian Junior

View File

@ -1,4 +1,4 @@
# /usr/share/make-live/lists/mini - package list for make-live(1) # /usr/share/live-helper/lists/mini - package list for live-helper(7)
# Minimal # Minimal
eject file sudo vim-tiny eject file sudo vim-tiny

View File

@ -1,4 +1,4 @@
# /usr/share/make-live/lists/minimal - package list for make-live(1) # /usr/share/live-helper/lists/minimal - package list for live-helper(7)
# Minimal # Minimal
eject file sudo vim-tiny eject file sudo vim-tiny

View File

@ -1,4 +1,4 @@
# /usr/share/make-live/lists/rescue - package list for make-live(1) # /usr/share/live-helper/lists/rescue - package list for live-helper(7)
# Minimal # Minimal
eject file sudo vim-tiny eject file sudo vim-tiny

View File

@ -1,4 +1,4 @@
# /usr/share/make-live/lists/standard - package list for make-live(1) # /usr/share/live-helper/lists/standard - package list for live-helper(7)
# Minimal # Minimal
eject file sudo vim-tiny eject file sudo vim-tiny

View File

@ -1,4 +1,4 @@
# /usr/share/make-live/lists/x11 - package list for make-live(1) # /usr/share/live-helper/lists/standard-x11 - package list for live-helper(7)
# Minimal # Minimal
eject file sudo vim-tiny eject file sudo vim-tiny
@ -7,5 +7,5 @@ eject file sudo vim-tiny
console-common kbd locales console-common kbd locales
# X11 # X11
xorg xresprobe discover xorg xresprobe discover menu
alsa-base alsa-oss alsa-utils alsa-base alsa-oss alsa-utils

View File

@ -1,4 +1,4 @@
# /usr/share/make-live/lists/xfce - package list for make-live(1) # /usr/share/live-helper/lists/xfce - package list for live-helper(7)
# Minimal # Minimal
eject file sudo vim-tiny eject file sudo vim-tiny
@ -10,5 +10,5 @@ console-common kbd locales
xfce4 gdm xfce4 gdm
desktop-base desktop-base
xorg xresprobe discover xorg xresprobe discover menu
alsa-base alsa-oss alsa-utils alsa-base alsa-oss alsa-utils

View File

@ -1,4 +1,4 @@
# /usr/share/make-live/lists/xfce - package list for make-live(1) # /usr/share/live-helper/lists/xfce - package list for live-helper(7)
# Minimal # Minimal
eject file sudo vim-tiny eject file sudo vim-tiny
@ -10,7 +10,7 @@ console-common kbd locales
xfce4 gdm xfce4 gdm
desktop-base desktop-base
xorg xresprobe discover xorg xresprobe discover menu
alsa-base alsa-oss alsa-utils alsa-base alsa-oss alsa-utils
# Debian Junior # Debian Junior

View File

@ -1,4 +1,4 @@
.TH LH_BINARY 1 "2007\-03\-26" "1.0~a3" "live\-helper" .TH LH_BINARY 1 "2007\-04\-02" "1.0~a4" "live\-helper"
.SH NAME .SH NAME
lh_binary \- meta-helper for lh_binary_* lh_binary \- meta-helper for lh_binary_*
@ -10,12 +10,16 @@ lh_binary \- meta-helper for lh_binary_*
lh_binary is a meta-helper. It calls all necessary helpers to complete the binary stage. lh_binary is a meta-helper. It calls all necessary helpers to complete the binary stage.
.SH OPTIONS .SH OPTIONS
lh_bootstrap has no options (FIXME). lh_binary has no options (FIXME).
.SH BINARY HELPERS .SH BINARY HELPERS
Here is the complete list of available binary helper commands. See their man pages for additional documentation. Here is the complete list of available binary helper commands. See their man pages for additional documentation.
.IP "\fIlh_binary_chroot\fR(1)" 4
copies chroot into chroot.
.IP "\fIlh_binary_encryption\fR(1)" 4 .IP "\fIlh_binary_encryption\fR(1)" 4
encrypts the root filesystem. encrypts the root filesystem.
.IP "\fIlh_binary_grub\fR(1)" 4
copies grub into the binary image.
.IP "\fIlh_binary_includes\fR(1)" 4 .IP "\fIlh_binary_includes\fR(1)" 4
copies files into the binary image. copies files into the binary image.
.IP "\fIlh_binary_hdd\fR(1)" 4 .IP "\fIlh_binary_hdd\fR(1)" 4

View File

@ -1,4 +1,4 @@
.TH LH_BOOTSTRAP 1 "2007\-03\-26" "1.0~a3" "live\-helper" .TH LH_BOOTSTRAP 1 "2007\-04\-02" "1.0~a4" "live\-helper"
.SH NAME .SH NAME
lh_bootstrap \- meta-helper for lh_bootstrap_* lh_bootstrap \- meta-helper for lh_bootstrap_*

View File

@ -1,4 +1,4 @@
.TH LH_BOOTSTRAP_CDEBOOTSTRAP 1 "2007\-03\-26" "1.0~a3" "live\-helper" .TH LH_BOOTSTRAP_CDEBOOTSTRAP 1 "2007\-04\-02" "1.0~a4" "live\-helper"
.SH NAME .SH NAME
lh_bootstrap_cdebootstrap \- bootstrap a Debian system with \fIcdebootstrap\fR(1) lh_bootstrap_cdebootstrap \- bootstrap a Debian system with \fIcdebootstrap\fR(1)

View File

@ -1,4 +1,4 @@
.TH LH_BOOTSTRAP_DEBOOTSTRAP 1 "2007\-03\-26" "1.0~a3" "live\-helper" .TH LH_BOOTSTRAP_DEBOOTSTRAP 1 "2007\-04\-02" "1.0~a4" "live\-helper"
.SH NAME .SH NAME
lh_bootstrap_debootstrap \- bootstrap a Debian system with \fIdebootstrap\fR(8) lh_bootstrap_debootstrap \- bootstrap a Debian system with \fIdebootstrap\fR(8)

74
manpages/lh_chroot.1 Normal file
View File

@ -0,0 +1,74 @@
.TH LH_CHROOT 1 "2007\-04\-02" "1.0~a4" "live\-helper"
.SH NAME
lh_chroot \- meta-helper for lh_chroot_*
.SH SYNOPSIS
.B lh_chroot [\fIlive\-helper\ options\fR\|]
.SH DESCRIPTION
lh_chroot is a meta-helper. It calls all necessary helpers to complete the chroot stage.
.SH OPTIONS
lh_chroot has no options (FIXME).
.SH CHROOT HELPERS
Here is the complete list of available chroot helper commands. See their man pages for additional documentation.
.IP "\fIlh_chroot_apt\fR(1)" 4
manages /etc/apt/apt.conf.
.IP "\fIlh_chroot_debianchroot\fR(1)" 4
manages /etc/debian_chroot.
.IP "\fIlh_chroot_hacks\fR(1)" 4
executes hacks in chroot.
.IP "\fIlh_chroot_hooks\fR(1)" 4
executes hooks in chroot.
.IP "\fIlh_chroot_hosts\fR(1)" 4
manages /etc/hosts.
.IP "\fIlh_chroot_interactive\fR(1)" 4
makes build interactive.
.IP "\fIlh_chroot_linuximage\fR(1)" 4
manage /etc/kernel-img.conf.
.IP "\fIlh_chroot_localhooks\fR(1)" 4
executes local hooks in chroot.
.IP "\fIlh_chroot_localincludes\fR(1)" 4
copies local files into chroot.
.IP "\fIlh_chroot_localization\fR(1)" 4
installs localization packages into chroot.
.IP "\fIlh_chroot_localpackages\fR(1)" 4
installs local packages into chroot.
.IP "\fIlh_chroot_localpackageslists\fR(1)" 4
installs local packages lists into chroot.
.IP "\fIlh_chroot_packages\fR(1)" 4
installs packages into chroot.
.IP "\fIlh_chroot_packageslists\fR(1)" 4
installs packages lists into chroot.
.IP "\fIlh_chroot_proc\fR(1)" 4
mounts /proc.
.IP "\fIlh_chroot_resolv\fR(1)" 4
manages /etc/resolv.conf.
.IP "\fIlh_chroot_sources\fR(1)" 4
manages /etc/apt/apt.conf.
.IP "\fIlh_chroot_symlinks\fR(1)" 4
convers symlinks.
.IP "\fIlh_chroot_sysfs\fR(1)" 4
mounts /sys.
.IP "\fIlh_chroot_sysvinit\fR(1)" 4
configures sysvinit.
.IP "\fIlh_chroot_sysvrc\fR(1)" 4
manages /usr/sbin/policy-rc.d.
.IP "\fIlh_chroot_tasks\fR(1)" 4
installs tasks into chroot.
.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> for the Debian project.

View File

@ -1,4 +1,4 @@
.TH LH_CLEAN 1 "2007\-03\-26" "1.0~a3" "live\-helper" .TH LH_CLEAN 1 "2007\-04\-02" "1.0~a4" "live\-helper"
.SH NAME .SH NAME
lh_clean \- clean up system build directories lh_clean \- clean up system build directories

View File

@ -1,4 +1,4 @@
.TH LH_TESTROOT 1 "2007\-03\-26" "1.0~a3" "live\-helper" .TH LH_TESTROOT 1 "2007\-04\-02" "1.0~a4" "live\-helper"
.SH NAME .SH NAME
lh_testroot \- ensure that a system is built as root lh_testroot \- ensure that a system is built as root

View File

@ -1,4 +1,4 @@
.TH LIVE\-HELPER 7 "2007\-03\-26" "1.0~a3" "live\-helper" .TH LIVE\-HELPER 7 "2007\-04\-02" "1.0~a4" "live\-helper"
.SH NAME .SH NAME
live\-helper \- Debian Live helper programs live\-helper \- Debian Live helper programs
@ -27,6 +27,8 @@ A typical program that uses live\-helper will call several live\-helper commands
Here is the complete list of available live\-helper commands. See their man pages for additional documentation. Here is the complete list of available live\-helper commands. See their man pages for additional documentation.
.IP "\fIlh_binary\fR(1)" 4 .IP "\fIlh_binary\fR(1)" 4
meta-helper for lh_binary_*. meta-helper for lh_binary_*.
.IP "\fIlh_binary_chroot\fR(1)" 4
copies chroot into chroot.
.IP "\fIlh_binary_encryption\fR(1)" 4 .IP "\fIlh_binary_encryption\fR(1)" 4
encrypts the root filesystem. encrypts the root filesystem.
.IP "\fIlh_binary_includes\fR(1)" 4 .IP "\fIlh_binary_includes\fR(1)" 4
@ -117,10 +119,10 @@ meta-helper for lh_source_*.
copies config into source directory. copies config into source directory.
.IP "\fIlh_source_download\fR(1)" 4 .IP "\fIlh_source_download\fR(1)" 4
downloads source packages. downloads source packages.
.IP "\fIlh_source_hdd\fR(1)" 4
creates harddisk source tarball.
.IP "\fIlh_source_generic\fR(1)" 4 .IP "\fIlh_source_generic\fR(1)" 4
creates generic source tarball. creates generic source tarball.
.IP "\fIlh_source_hdd\fR(1)" 4
creates harddisk source tarball.
.IP "\fIlh_source_iso\fR(1)" 4 .IP "\fIlh_source_iso\fR(1)" 4
creates CD/DVD source image. creates CD/DVD source image.
.IP "\fIlh_source_net\fR(1)" 4 .IP "\fIlh_source_net\fR(1)" 4

View File

@ -16,7 +16,7 @@ default 0
## timeout sec ## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry # Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined). # (normally the first entry defined).
timeout 1 #timeout 5
# Pretty colours # Pretty colours
color cyan/blue white/blue color cyan/blue white/blue
@ -59,11 +59,11 @@ color cyan/blue white/blue
## e.g. kopt=root=/dev/hda1 ro ## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro ## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro ## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=CDLABEL=Debian-Live rootfstype=iso9660 ro # kopt=root=/dev/hda1 ro
## default grub root device ## default grub root device
## e.g. groot=(hd0,0) ## e.g. groot=(hd0,0)
# groot=(hd0,4) # groot=(hd0,0)
## should update-grub create alternative automagic boot options ## should update-grub create alternative automagic boot options
## e.g. alternative=true ## e.g. alternative=true
@ -115,21 +115,10 @@ color cyan/blue white/blue
## ## End Default Options ## ## ## End Default Options ##
title Debian Live (default) LIVE_SPLASH
root (cd)
kernel /boot/vmlinuz root=CDLABEL=Debian-Live rootfstype=iso9660 ro boot=casper
initrd /boot/initrd.img
savedefault
title Debian Live (run from RAM) LIVE_KERNEL_LIVE
root (cd)
kernel /boot/vmlinuz root=CDLABEL=Debian-Live rootfstype=iso9660 ro boot=casper toram
initrd /boot/initrd.img
savedefault
title memtest86+ RAM tester LIVE_KERNEL_INSTALL
root (cd)
kernel /boot/memtest
savedefault
### END DEBIAN AUTOMAGIC KERNELS LIST ### END DEBIAN AUTOMAGIC KERNELS LIST

View File

@ -1,5 +1,6 @@
default linux default live
LIVE_KERNEL LIVE_KERNEL_LIVE
LIVE_KERNEL_INSTALL
LIVE_MEMTEST LIVE_MEMTEST
display isolinux.txt display isolinux.txt
timeout 0 timeout 0

View File

@ -1,19 +1,19 @@
default linux default live
label linux label live
kernel vmlinuz kernel vmlinuz
append initrd=initrd.gz boot=casper netboot nfsroot=LIVE_SERVER_ADDRESS:LIVE_SERVER_PATH LIVE_BOOTAPPEND append initrd=initrd.img boot=casper netboot nfsroot=LIVE_SERVER_ADDRESS:LIVE_SERVER_PATH LIVE_BOOTAPPEND
label nfs label nfs
kernel vmlinuz kernel vmlinuz
append initrd=initrd.gz boot=casper netboot=nfs nfsroot=LIVE_SERVER_ADDRESS:LIVE_SERVER_PATH LIVE_BOOTAPPEND append initrd=initrd.img boot=casper netboot=nfs nfsroot=LIVE_SERVER_ADDRESS:LIVE_SERVER_PATH LIVE_BOOTAPPEND
label nfslegacy label nfslegacy
kernel vmlinuz kernel vmlinuz
append initrd=initrd.gz boot=casper root=/dev/nfs nfsroot=LIVE_SERVER_ADDRESS:LIVE_SERVER_PATH LIVE_BOOTAPPEND append initrd=initrd.img boot=casper root=/dev/nfs nfsroot=LIVE_SERVER_ADDRESS:LIVE_SERVER_PATH LIVE_BOOTAPPEND
label cifs label cifs
kernel vmlinuz kernel vmlinuz
append initrd=initrd.gz boot=casper netboot=cifs nfsroot=LIVE_SERVER_ADDRESS:LIVE_SERVER_PATH LIVE_BOOTAPPEND append initrd=initrd.img boot=casper netboot=cifs nfsroot=LIVE_SERVER_ADDRESS:LIVE_SERVER_PATH LIVE_BOOTAPPEND
label cifslegacy label cifslegacy
kernel vmlinuz kernel vmlinuz
append initrd=initrd.gz boot=casper root=/dev/cifs nfsroot=LIVE_SERVER_ADDRESS:LIVE_SERVER_PATH LIVE_BOOTAPPEND append initrd=initrd.img boot=casper root=/dev/cifs nfsroot=LIVE_SERVER_ADDRESS:LIVE_SERVER_PATH LIVE_BOOTAPPEND
label memtest label memtest
kernel memtest kernel memtest
display pxelinux.cfg/isolinux.txt display pxelinux.cfg/isolinux.txt