summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config73
-rw-r--r--src/lists/gnome1
-rw-r--r--src/lists/gnome-core1
-rw-r--r--src/lists/gnome-full1
-rw-r--r--src/lists/kde1
-rw-r--r--src/lists/kde-core1
-rw-r--r--src/lists/kde-core-i18n1
-rw-r--r--src/lists/kde-extra1
-rw-r--r--src/lists/kde-extra-i18n1
-rw-r--r--src/lists/kde-full1
-rw-r--r--src/lists/kde-full-i18n1
-rw-r--r--src/lists/kde-i18n1
-rw-r--r--src/lists/standard-i18n1
-rw-r--r--src/lists/x111
-rw-r--r--src/lists/x11-core1
-rw-r--r--src/lists/xfce1
-rwxr-xr-xsrc/main.sh321
-rw-r--r--src/scripts/01init.sh20
-rw-r--r--src/scripts/02defaults.sh171
-rw-r--r--src/scripts/11bootstrap.sh36
-rw-r--r--src/scripts/12patch.sh95
-rw-r--r--src/scripts/13chroot.sh116
-rw-r--r--src/scripts/21image.sh161
-rw-r--r--src/scripts/22iso.sh36
-rw-r--r--src/scripts/23net.sh55
25 files changed, 1099 insertions, 0 deletions
diff --git a/src/config b/src/config
new file mode 100644
index 0000000..b4f32b2
--- /dev/null
+++ b/src/config
@@ -0,0 +1,73 @@
+# /etc/make-live.conf - configuration file for make-live(8)
+
+# make-live does work out of the box. However, if you want to customize it,
+# you can edit the variables below. Look make-live.conf(8) for more information.
+
+# Root directory (Default: `pwd`/debian-live)
+#LIVE_ROOT="`pwd`/debian-live"
+
+# Image type (Default: iso)
+#LIVE_TYPE="iso"
+
+# Bootstrap architecture (Default: auto-detected)
+#LIVE_ARCHITECTURE="i386"
+
+# Boot parameters (Default: empty)
+#LIVE_BOOTAPPEND=""
+
+# Chroot directory (Default: ${LIVE_ROOT}/chroot)
+#LIVE_CHROOT="${LIVE_ROOT}/chroot"
+
+# Configuration file (Default: /etc/make-live.conf)
+#LIVE_CONFIG="/etc/make-live.conf"
+
+# Debian distribution (Default: sid)
+#LIVE_DISTRIBUTION="sid"
+
+# Image filesystem (Default: squashfs for iso, plain for net)
+#LIVE_FILESYSTEM="squashfs"
+
+# Bootstrap flavour (Default: standard)
+#LIVE_FLAVOUR="standard"
+
+# User command (Default: empty)
+#LIVE_HOOK=""
+
+# Chroot includes (Default: empty)
+#LIVE_INCLUDE_CHROOT=""
+
+# Image includes (Default: empty)
+#LIVE_INCLUDE_IMAGE=""
+
+# Kernel flavour (Default: auto-detected)
+#LIVE_KERNEL=""
+
+# Debian mirror (Default: http://ftp.debian.org/debian)
+#LIVE_MIRROR="http://ftp.debian.org/debian"
+
+# Debian security mirror (Default: http://security.debian.org/debian)
+#LIVE_MIRROR_SECURITY="http://ftp.debian.org/debian-security"
+
+# Packages (Default: empty)
+LIVE_PACKAGES="cdebootstrap less locales screen sudo vim"
+
+# Package list (Default: empty)
+#LIVE_PACKAGE_LIST=""
+
+# Chroots ftp_proxy (Default: empty)
+#LIVE_PROXY_FTP=""
+
+# Chroots http_proxy (Default: empty)
+#LIVE_PROXY_HTTP=""
+
+# Debian section (Default: main)
+#LIVE_SECTION="main"
+
+# Netboot server (Default: 192.168.1.1)
+#LIVE_SERVER_ADDRESS=""
+
+# Netboot path (Default: /srv/debian-live/chroot)
+#LIVE_SERVER_PATH=""
+
+# Image templates (Default: /usr/share/make-live/templates)
+#LIVE_TEMPLATES="/usr/share/make-live/templates"
diff --git a/src/lists/gnome b/src/lists/gnome
new file mode 100644
index 0000000..c8b48f0
--- /dev/null
+++ b/src/lists/gnome
@@ -0,0 +1 @@
+gnome-desktop-environment gdm-themes gnome-cups-manager gnome-themes-extras rhythmbox synaptic gnome-screensaver gdm x-window-system-core
diff --git a/src/lists/gnome-core b/src/lists/gnome-core
new file mode 100644
index 0000000..e751336
--- /dev/null
+++ b/src/lists/gnome-core
@@ -0,0 +1 @@
+gnome-core gdm x-window-system-core
diff --git a/src/lists/gnome-full b/src/lists/gnome-full
new file mode 100644
index 0000000..50e8607
--- /dev/null
+++ b/src/lists/gnome-full
@@ -0,0 +1 @@
+gnome gdm x-window-system-core
diff --git a/src/lists/kde b/src/lists/kde
new file mode 100644
index 0000000..7918920
--- /dev/null
+++ b/src/lists/kde
@@ -0,0 +1 @@
+kde kdm x-window-system-core
diff --git a/src/lists/kde-core b/src/lists/kde-core
new file mode 100644
index 0000000..f1f4c7c
--- /dev/null
+++ b/src/lists/kde-core
@@ -0,0 +1 @@
+kde-core kdm x-window-system-core
diff --git a/src/lists/kde-core-i18n b/src/lists/kde-core-i18n
new file mode 100644
index 0000000..4159acc
--- /dev/null
+++ b/src/lists/kde-core-i18n
@@ -0,0 +1 @@
+kde-core kdm x-window-system-core kde-i18n-af kde-i18n-ar kde-i18n-az kde-i18n-bg kde-i18n-bn kde-i18n-br kde-i18n-bs kde-i18n-ca kde-i18n-cs kde-i18n-cy kde-i18n-da kde-i18n-de kde-i18n-el kde-i18n-engb kde-i18n-eo kde-i18n-es kde-i18n-et kde-i18n-eu kde-i18n-fa kde-i18n-fi kde-i18n-fr kde-i18n-fy kde-i18n-ga kde-i18n-gl kde-i18n-he kde-i18n-hi kde-i18n-hr kde-i18n-hu kde-i18n-is kde-i18n-it kde-i18n-ja kde-i18n-km kde-i18n-ko kde-i18n-lt kde-i18n-lv kde-i18n-mk kde-i18n-mn kde-i18n-ms kde-i18n-nb kde-i18n-nds kde-i18n-nl kde-i18n-nn kde-i18n-pa kde-i18n-pl kde-i18n-pt kde-i18n-ptbr kde-i18n-ro kde-i18n-ru kde-i18n-rw kde-i18n-se kde-i18n-sk kde-i18n-sl kde-i18n-sr kde-i18n-srlatin kde-i18n-ss kde-i18n-sv kde-i18n-ta kde-i18n-tg kde-i18n-tr kde-i18n-uk kde-i18n-uz kde-i18n-zhcn manpages manpages-de manpages-de-dev manpages-dev manpages-es manpages-es-extra manpages-fi manpages-fr manpages-hu manpages-it manpages-ja manpages-ja-dev manpages-ko manpages-nl manpages-pl manpages-pl-dev manpages-pt manpages-pt-dev manpages-ru manpages-tr manpages-zh
diff --git a/src/lists/kde-extra b/src/lists/kde-extra
new file mode 100644
index 0000000..1180267
--- /dev/null
+++ b/src/lists/kde-extra
@@ -0,0 +1 @@
+kde koffice kde-extras kdm x-window-system-core
diff --git a/src/lists/kde-extra-i18n b/src/lists/kde-extra-i18n
new file mode 100644
index 0000000..ca5faff
--- /dev/null
+++ b/src/lists/kde-extra-i18n
@@ -0,0 +1 @@
+kde koffice kde-extras kdm x-window-system-core kde-i18n-af kde-i18n-ar kde-i18n-az kde-i18n-bg kde-i18n-bn kde-i18n-br kde-i18n-bs kde-i18n-ca kde-i18n-cs kde-i18n-cy kde-i18n-da kde-i18n-de kde-i18n-el kde-i18n-engb kde-i18n-eo kde-i18n-es kde-i18n-et kde-i18n-eu kde-i18n-fa kde-i18n-fi kde-i18n-fr kde-i18n-fy kde-i18n-ga kde-i18n-gl kde-i18n-he kde-i18n-hi kde-i18n-hr kde-i18n-hu kde-i18n-is kde-i18n-it kde-i18n-ja kde-i18n-km kde-i18n-ko kde-i18n-lt kde-i18n-lv kde-i18n-mk kde-i18n-mn kde-i18n-ms kde-i18n-nb kde-i18n-nds kde-i18n-nl kde-i18n-nn kde-i18n-pa kde-i18n-pl kde-i18n-pt kde-i18n-ptbr kde-i18n-ro kde-i18n-ru kde-i18n-rw kde-i18n-se kde-i18n-sk kde-i18n-sl kde-i18n-sr kde-i18n-srlatin kde-i18n-ss kde-i18n-sv kde-i18n-ta kde-i18n-tg kde-i18n-tr kde-i18n-uk kde-i18n-uz kde-i18n-zhcn koffice-i18n-af koffice-i18n-bg koffice-i18n-br koffice-i18n-ca koffice-i18n-cs koffice-i18n-cy koffice-i18n-da koffice-i18n-de koffice-i18n-el koffice-i18n-engb koffice-i18n-eo koffice-i18n-es koffice-i18n-et koffice-i18n-fa koffice-i18n-fi koffice-i18n-fr koffice-i18n-he koffice-i18n-hsb koffice-i18n-hu koffice-i18n-it koffice-i18n-ja koffice-i18n-lo koffice-i18n-mt koffice-i18n-nb koffice-i18n-nl koffice-i18n-nn koffice-i18n-pl koffice-i18n-pt koffice-i18n-ptbr koffice-i18n-ru koffice-i18n-se koffice-i18n-sk koffice-i18n-sl koffice-i18n-sr koffice-i18n-sv koffice-i18n-tg koffice-i18n-th koffice-i18n-tr koffice-i18n-ven koffice-i18n-xh koffice-i18n-zhcn koffice-i18n-zhcngb2312 koffice-i18n-zhtw koffice-i18n-zhtwbig5 koffice-i18n-zu manpages manpages-de manpages-de-dev manpages-dev manpages-es manpages-es-extra manpages-fi manpages-fr manpages-hu manpages-it manpages-ja manpages-ja-dev manpages-ko manpages-nl manpages-pl manpages-pl-dev manpages-pt manpages-pt-dev manpages-ru manpages-tr manpages-zh
diff --git a/src/lists/kde-full b/src/lists/kde-full
new file mode 100644
index 0000000..13fe000
--- /dev/null
+++ b/src/lists/kde-full
@@ -0,0 +1 @@
+kde koffice kdm x-window-system-core
diff --git a/src/lists/kde-full-i18n b/src/lists/kde-full-i18n
new file mode 100644
index 0000000..097bc27
--- /dev/null
+++ b/src/lists/kde-full-i18n
@@ -0,0 +1 @@
+kde koffice kdm x-window-system-core kde-i18n-af kde-i18n-ar kde-i18n-az kde-i18n-bg kde-i18n-bn kde-i18n-br kde-i18n-bs kde-i18n-ca kde-i18n-cs kde-i18n-cy kde-i18n-da kde-i18n-de kde-i18n-el kde-i18n-engb kde-i18n-eo kde-i18n-es kde-i18n-et kde-i18n-eu kde-i18n-fa kde-i18n-fi kde-i18n-fr kde-i18n-fy kde-i18n-ga kde-i18n-gl kde-i18n-he kde-i18n-hi kde-i18n-hr kde-i18n-hu kde-i18n-is kde-i18n-it kde-i18n-ja kde-i18n-km kde-i18n-ko kde-i18n-lt kde-i18n-lv kde-i18n-mk kde-i18n-mn kde-i18n-ms kde-i18n-nb kde-i18n-nds kde-i18n-nl kde-i18n-nn kde-i18n-pa kde-i18n-pl kde-i18n-pt kde-i18n-ptbr kde-i18n-ro kde-i18n-ru kde-i18n-rw kde-i18n-se kde-i18n-sk kde-i18n-sl kde-i18n-sr kde-i18n-srlatin kde-i18n-ss kde-i18n-sv kde-i18n-ta kde-i18n-tg kde-i18n-tr kde-i18n-uk kde-i18n-uz kde-i18n-zhcn koffice-i18n-af koffice-i18n-bg koffice-i18n-br koffice-i18n-ca koffice-i18n-cs koffice-i18n-cy koffice-i18n-da koffice-i18n-de koffice-i18n-el koffice-i18n-engb koffice-i18n-eo koffice-i18n-es koffice-i18n-et koffice-i18n-fa koffice-i18n-fi koffice-i18n-fr koffice-i18n-he koffice-i18n-hsb koffice-i18n-hu koffice-i18n-it koffice-i18n-ja koffice-i18n-lo koffice-i18n-mt koffice-i18n-nb koffice-i18n-nl koffice-i18n-nn koffice-i18n-pl koffice-i18n-pt koffice-i18n-ptbr koffice-i18n-ru koffice-i18n-se koffice-i18n-sk koffice-i18n-sl koffice-i18n-sr koffice-i18n-sv koffice-i18n-tg koffice-i18n-th koffice-i18n-tr koffice-i18n-ven koffice-i18n-xh koffice-i18n-zhcn koffice-i18n-zhcngb2312 koffice-i18n-zhtw koffice-i18n-zhtwbig5 koffice-i18n-zu manpages manpages-de manpages-de-dev manpages-dev manpages-es manpages-es-extra manpages-fi manpages-fr manpages-hu manpages-it manpages-ja manpages-ja-dev manpages-ko manpages-nl manpages-pl manpages-pl-dev manpages-pt manpages-pt-dev manpages-ru manpages-tr manpages-zh
diff --git a/src/lists/kde-i18n b/src/lists/kde-i18n
new file mode 100644
index 0000000..aa2b4ba
--- /dev/null
+++ b/src/lists/kde-i18n
@@ -0,0 +1 @@
+kde kdm x-window-system-core kde-i18n-af kde-i18n-ar kde-i18n-az kde-i18n-bg kde-i18n-bn kde-i18n-br kde-i18n-bs kde-i18n-ca kde-i18n-cs kde-i18n-cy kde-i18n-da kde-i18n-de kde-i18n-el kde-i18n-engb kde-i18n-eo kde-i18n-es kde-i18n-et kde-i18n-eu kde-i18n-fa kde-i18n-fi kde-i18n-fr kde-i18n-fy kde-i18n-ga kde-i18n-gl kde-i18n-he kde-i18n-hi kde-i18n-hr kde-i18n-hu kde-i18n-is kde-i18n-it kde-i18n-ja kde-i18n-km kde-i18n-ko kde-i18n-lt kde-i18n-lv kde-i18n-mk kde-i18n-mn kde-i18n-ms kde-i18n-nb kde-i18n-nds kde-i18n-nl kde-i18n-nn kde-i18n-pa kde-i18n-pl kde-i18n-pt kde-i18n-ptbr kde-i18n-ro kde-i18n-ru kde-i18n-rw kde-i18n-se kde-i18n-sk kde-i18n-sl kde-i18n-sr kde-i18n-srlatin kde-i18n-ss kde-i18n-sv kde-i18n-ta kde-i18n-tg kde-i18n-tr kde-i18n-uk kde-i18n-uz kde-i18n-zhcn manpages manpages-de manpages-de-dev manpages-dev manpages-es manpages-es-extra manpages-fi manpages-fr manpages-hu manpages-it manpages-ja manpages-ja-dev manpages-ko manpages-nl manpages-pl manpages-pl-dev manpages-pt manpages-pt-dev manpages-ru manpages-tr manpages-zh
diff --git a/src/lists/standard-i18n b/src/lists/standard-i18n
new file mode 100644
index 0000000..6530405
--- /dev/null
+++ b/src/lists/standard-i18n
@@ -0,0 +1 @@
+manpages manpages-de manpages-de-dev manpages-dev manpages-es manpages-es-extra manpages-fi manpages-fr manpages-hu manpages-it manpages-ja manpages-ja-dev manpages-ko manpages-nl manpages-pl manpages-pl-dev manpages-pt manpages-pt-dev manpages-ru manpages-tr manpages-zh
diff --git a/src/lists/x11 b/src/lists/x11
new file mode 100644
index 0000000..db285e5
--- /dev/null
+++ b/src/lists/x11
@@ -0,0 +1 @@
+xdm x-window-system
diff --git a/src/lists/x11-core b/src/lists/x11-core
new file mode 100644
index 0000000..dda2615
--- /dev/null
+++ b/src/lists/x11-core
@@ -0,0 +1 @@
+xdm x-window-system-core
diff --git a/src/lists/xfce b/src/lists/xfce
new file mode 100644
index 0000000..81cec99
--- /dev/null
+++ b/src/lists/xfce
@@ -0,0 +1 @@
+xfce4 gdm x-window-system-core
diff --git a/src/main.sh b/src/main.sh
new file mode 100755
index 0000000..2d8fda9
--- /dev/null
+++ b/src/main.sh
@@ -0,0 +1,321 @@
+#!/bin/sh
+
+# make-live - utility to build Debian Live systems
+#
+# Copyright (C) 2006 Daniel Baumann <daniel@debian.org>
+# Copyright (C) 2006 Marco Amadori <marco.amadori@gmail.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# On Debian systems, the complete text of the GNU General Public License
+# can be found in /usr/share/common-licenses/GPL file.
+
+set -e
+
+# Set static variables
+BASE="/usr/share/make-live"
+CONFIG="/etc/make-live.conf"
+PROGRAM="`basename ${0}`"
+VERSION="0.99.3"
+
+CODENAME_OLDSTABLE="woody"
+CODENAME_STABLE="sarge"
+CODENAME_TESTING="etch"
+CODENAME_UNSTABLE="sid"
+
+# Source sub scripts
+for SCRIPT in "${BASE}"/scripts/*
+do
+ . "${SCRIPT}"
+done
+
+Help ()
+{
+ echo "${PROGRAM} - utility to build Debian Live systems"
+ echo
+ echo "Usage: ${PROGRAM} [-a|--architecture ARCHITECTURE] [-b|--bootappend KERNEL_PARAMETER|\"KERNEL_PARAMETERS\"] [--config FILE] [-c|--chroot DIRECTORY] [-d|--distribution DISTRIBUTION] [--filesystem FILESYSTEM] [-f|--flavour BOOTSTRAP_FLAVOUR] [--hook COMMAND|\"COMMANDS\"] [--include-chroot FILE|DIRECTORY] [--include-image FILE|DIRECTORY] [-k|--kernel KERNEL_FLAVOUR] [-m|--mirror URL] [--mirror-security URL] [-p|--packages PACKAGE|\"PACKAGES\"] [--package-list FILE] [--proxy-ftp URL] [--proxy-http URL] [-r|--root DIRECTORY] [-s|--section SECTION|\"SECTIONS\"] [--server-address HOSTNAME|IP] [--server-path DIRECTORY] [--templates DIRECTORY] [-t|--type TYPE] [LIST]"
+ echo "Usage: ${PROGRAM} [-h|--help]"
+ echo "Usage: ${PROGRAM} [-u|--usage]"
+ echo "Usage: ${PROGRAM} [-v|--version]"
+ echo
+ echo "Lists: gnome, gnome-core, gnome-full, kde, kde-core, kde-core-i18n, kde-extra, kde-extra-i18n, kde-full, kde-full-i18n, kde-i18n, standard-i18n, x11, x11-core, xfce."
+ echo
+ echo "Values:"
+ echo " Architectures: alpha, amd64, arm, hppa, i386, ia64, m68k, powerpc, s390, sparc."
+ echo " Distributions: etch, sid, or testing, unstable."
+ echo " Filesystems: ext2, plain, squashfs."
+ echo " Boostrap flavours: minimal, standard."
+ echo " Kernel flavours: Debian Kernel flavour of your architecture."
+ echo " Types: iso, net."
+ echo
+ echo "Options:"
+ echo " -a, --architecture: specifies the bootstrap architecture."
+ echo " -b, --bootappend: specifies the kernel parameter(s)."
+ echo " --config: specifies an alternate configuration file."
+ echo " -c, --chroot: specifies the chroot directory."
+ echo " -d, --distribution: specifies the debian distribution."
+ echo " --filesystem: specifies the chroot filesystem."
+ echo " -f, --flavour: specifies the bootstrap flavour."
+ echo " --hook: specifies extra command(s)."
+ echo " --include-chroot: specifies file or directory for chroot inclusion."
+ echo " --include-image: specifies file or directory for image inclusion."
+ echo " -k, --kernel: specifies debian kernel flavour."
+ echo " -m, --mirror: specifies debian mirror."
+ echo " --mirror-security: specifies debian security mirror."
+ echo " -p, --packages: specifies aditional packages."
+ echo " --package-list: specifies additonal package list."
+ echo " -r, --root: specifies build root."
+ echo " --proxy-ftp: specifies \${ftp_proxy}."
+ echo " --proxy-http: specifies \${http_proxy}."
+ echo " -s, --section: specifies the debian sections."
+ echo " --server-address: specifies the netboot server address."
+ echo " --server-path: specifies the netboot server path for chroot."
+ echo " --templates: specifies location of the templates."
+ echo " -t, --type: specifies live system type."
+ echo
+ echo "Environment:"
+ echo " All settings can be also specified trough environment variables. Please see make-live.conf(8) for more information."
+ echo
+ echo "Report bugs to Debian Live project <http://live.debian.net>."
+ exit 1
+}
+
+Usage ()
+{
+ echo "${PROGRAM} - utility to build Debian Live systems"
+ echo
+ echo "Usage: ${PROGRAM} [-a|--architecture ARCHITECTURE] [-b|--bootappend KERNEL_PARAMETER|\"KERNEL_PARAMETERS\"] [--config FILE] [-c|--chroot DIRECTORY] [-d|--distribution DISTRIBUTION] [--filesystem FILESYSTEM] [-f|--flavour BOOTSTRAP_FLAVOUR] [--hook COMMAND|\"COMMANDS\"] [--include-chroot FILE|DIRECTORY] [--include-image FILE|DIRECTORY] [-k|--kernel KERNEL_FLAVOUR] [-m|--mirror URL] [--mirror-security URL] [-p|--packages PACKAGE|\"PACKAGES\"] [--package-list FILE] [--proxy-ftp URL] [--proxy-http URL] [-r|--root DIRECTORY] [-s|--section SECTION|\"SECTIONS\"] [--server-address HOSTNAME|IP] [--server-path DIRECTORY] [--templates DIRECTORY] [-t|--type TYPE] [LIST]"
+ 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 ()
+{
+ echo "${PROGRAM}, version ${VERSION}"
+ echo
+ echo "Copyright (C) 2006 Daniel Baumann <daniel@debian.org>"
+ echo "Copyright (C) 2006 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://live.debian.net/>"
+ exit 1
+}
+
+Configuration ()
+{
+ # Source default configuration
+ if [ -r "${CONFIG}" ]
+ then
+ . "${CONFIG}"
+ fi
+
+ # Source alternate configuration
+ if [ -n "${LIVE_CONFIG}" ]
+ then
+ if [ -r "${LIVE_CONFIG}" ]
+ then
+ . "${LIVE_CONFIG}"
+ fi
+ fi
+}
+
+Main ()
+{
+ ARGUMENTS="`getopt --longoptions root:,type:,architecture:,bootappend:,config:,chroot:,distribution:,filesystem:,flavour:,hook:,include-chroot:,include-image:,kernel:,mirror:,mirror-security:,packages:,package-list:,proxy-ftp:,proxy-http:,section:,server-address:,server-path:,templates:,help,usage,version --name=${PROGRAM} --options r:t:a:b:c:d:f:k:m:p:s:huv --shell sh -- ${@}`"
+
+ if [ "${?}" != "0" ]
+ then
+ echo "Terminating." >&2
+ exit 1
+ fi
+
+ eval set -- "${ARGUMENTS}"
+
+ while true
+ do
+ case "${1}" in
+ -r|--root)
+ LIVE_ROOT="${2}"; shift 2
+ ;;
+
+ -t|--type)
+ LIVE_TYPE="${2}"; shift 2
+ ;;
+
+ -a|--architecture)
+ LIVE_ARCHITECTURE="${2}"; shift 2
+ ;;
+
+ -b|--bootappend)
+ LIVE_BOOTAPPEND="${2}"; shift 2
+ ;;
+
+ --config)
+ LIVE_CONFIG="${2}"; shift 2
+ ;;
+
+ -c|--chroot)
+ LIVE_CHROOT="${2}"; shift 2
+ ;;
+
+ -d|--distribution)
+ case "${2}" in
+ testing)
+ LIVE_DISTRIBUTION="${CODENAME_TESTING}"
+ ;;
+
+ unstable)
+ LIVE_DISTRIBUTION="${CODENAME_UNSTABLE}"
+ ;;
+
+ *)
+ LIVE_DISTRIBUTION="${2}"
+ ;;
+ esac
+
+ shift 2
+ ;;
+
+ --filesystem)
+ LIVE_FILESYSTEM="${2}"; shift 2
+ ;;
+
+ -f|--flavour)
+ LIVE_FLAVOUR="${2}"; shift 2
+ ;;
+ --hook)
+ LIVE_HOOK="${2}"; shift 2
+ ;;
+
+ --include-chroot)
+ LIVE_INCLUDE_CHROOT="${2}"; shift 2
+ ;;
+
+ --include-image)
+ LIVE_INCLUDE_IMAGE="${2}"; shift 2
+ ;;
+
+ -k|--kernel)
+ LIVE_KERNEL="${2}"; shift 2
+ ;;
+
+ -m|--mirror)
+ LIVE_MIRROR="${2}"; shift 2
+ ;;
+
+ --mirror-security)
+ LIVE_MIRROR_SECURITY="${2}"; shift 2
+ ;;
+
+ -p|--packages)
+ LIVE_PACKAGES="${2}"; shift 2
+ ;;
+
+ --package-list)
+ LIVE_PACKAGE_LIST="${2}"; shift 2
+ ;;
+
+ --proxy-ftp)
+ LIVE_PROXY_FTP="${2}"; shift 2
+ ;;
+
+ --proxy-http)
+ LIVE_PROXY_HTTP="${2}"; shift 2
+ ;;
+
+ -s|--section)
+ LIVE_SECTION="${2}"; shift 2
+ ;;
+
+ --server-address)
+ LIVE_SERVER_ADDRESS="${2}"; shift 2
+ ;;
+
+ --server-path)
+ LIVE_SERVER_PATH="${2}"; shift 2
+ ;;
+
+ --templates)
+ LIVE_TEMPLATES="${2}"; shift 2
+ ;;
+
+ -h|--help)
+ Help; shift
+ ;;
+
+ -u|--usage)
+ Usage; shift
+ ;;
+
+ -v|--version)
+ Version; shift
+ ;;
+
+ --)
+ shift; break
+ ;;
+
+ *)
+ echo "Internal error."
+ exit 1
+ ;;
+ esac
+ done
+
+ # Check for package lists
+ if [ -n "${1}" ]
+ then
+ LIVE_PACKAGE_LIST="${BASE}/lists/${1}"
+
+ if [ ! -r "${LIVE_PACKAGE_LIST}" ]
+ then
+ LIVE_PACKAGE_LIST=""
+ fi
+ fi
+
+ # Initialising
+ Init
+ Configuration
+ Defaults
+
+ # Building live system
+ Bootstrap
+ Chroot
+
+ # Building live image
+ "${LIVE_TYPE}"
+}
+
+Main "${@}"
diff --git a/src/scripts/01init.sh b/src/scripts/01init.sh
new file mode 100644
index 0000000..6947f6f
--- /dev/null
+++ b/src/scripts/01init.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# make-live - utility to build Debian Live systems
+#
+# Copyright (C) 2006 Daniel Baumann <daniel@debian.org>
+# Copyright (C) 2006 Marco Amadori <marco.amadori@gmail.com>
+#
+# make-live 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.
+
+Init ()
+{
+ # Check if user is root
+ if [ "`id -u`" -ne "0" ]
+ then
+ echo "E: ${PROGRAM} requires superuser privilege."
+ exit 1
+ fi
+}
diff --git a/src/scripts/02defaults.sh b/src/scripts/02defaults.sh
new file mode 100644
index 0000000..9a0342d
--- /dev/null
+++ b/src/scripts/02defaults.sh
@@ -0,0 +1,171 @@
+#!/bin/sh
+
+# make-live - utility to build Debian Live systems
+#
+# Copyright (C) 2006 Daniel Baumann <daniel@debian.org>
+# Copyright (C) 2006 Marco Amadori <marco.amadori@gmail.com>
+#
+# make-live 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.
+
+Defaults ()
+{
+ # Set root directory
+ if [ -z "${LIVE_ROOT}" ]
+ then
+ LIVE_ROOT="`pwd`/debian-live"
+ fi
+
+ # Set image type
+ if [ -n "${LIVE_TYPE}" ]
+ then
+ case "${LIVE_TYPE}" in
+ iso)
+ LIVE_TYPE="Iso"
+ ;;
+
+ net)
+ LIVE_TYPE="Net"
+ ;;
+
+ *)
+ echo "E: image type wrong or not yet supported."
+ ;;
+ esac
+ else
+ LIVE_TYPE="Iso"
+ fi
+
+ # Set bootstrap architecture
+ if [ -z "${LIVE_ARCHITECTURE}" ]
+ then
+ LIVE_ARCHITECTURE="`dpkg-architecture -qDEB_BUILD_ARCH`"
+ fi
+
+ # Set chroot directory
+ if [ -z "${LIVE_CHROOT}" ]
+ then
+ LIVE_CHROOT="${LIVE_ROOT}/chroot"
+ fi
+
+ # Set debian distribution
+ if [ -z "${LIVE_DISTRIBUTION}" ]
+ then
+ LIVE_DISTRIBUTION="${CODENAME_UNSTABLE}"
+ fi
+
+ # Set bootstrap flavour
+ if [ -z "${LIVE_FLAVOUR}" ]
+ then
+ LIVE_FLAVOUR="standard"
+ fi
+
+ # Set filesystem
+ if [ -z "${LIVE_FILESYSTEM}" ] && [ "${LIVE_TYPE}" = "Iso" ]
+ then
+ LIVE_FILESYSTEM="squashfs"
+ elif [ -z "${LIVE_FILESYSTEM}" ] && [ "${LIVE_TYPE}" = "Net" ]
+ then
+ LIVE_FILESYSTEM="plain"
+ fi
+
+ # Set kernel flavour
+ if [ -z "${LIVE_KERNEL}" ]
+ then
+ case "${LIVE_ARCHITECTURE}" in
+ alpha)
+ LIVE_KERNEL="alpha-generic"
+ ;;
+
+ amd64)
+ if [ "${LIVE_DISTRIBUTION}" = "${CODENAME_UNSTABLE}" ]
+ then
+ LIVE_KERNEL="amd64"
+ else
+ LIVE_KERNEL="amd64-generic"
+ fi
+ ;;
+
+ arm)
+ echo "E: You need to specify the linux kernel flavour manually on arm."
+ exit 1
+ ;;
+
+ hppa)
+ LIVE_KERNEL="parisc"
+ ;;
+
+ i386)
+ if [ "${LIVE_DISTRIBUTION}" = "${CODENAME_STABLE}" ] || [ "${LIVE_DISTRIBUTION}" = "${CODENAME_OLDSTABLE}" ]
+ then
+ LIVE_KERNEL="386"
+ else
+ LIVE_KERNEL="486"
+ fi
+ ;;
+
+ ia64)
+ LIVE_KERNEL="itanium"
+ ;;
+
+ m68k)
+ echo "E: You need to specify the linux kernel flavour manually on m68k."
+ exit 1
+ ;;
+
+ powerpc)
+ LIVE_KERNEL="powerpc"
+ ;;
+
+ s390)
+ LIVE_KERNEL="s390"
+ ;;
+
+ sparc)
+ LIVE_KERNEL="sparc32"
+ ;;
+
+ *)
+ echo "FIXME: Architecture not yet supported."
+ exit 1
+ ;;
+ esac
+ fi
+
+ # Set debian mirror
+ if [ -z "${LIVE_MIRROR}" ]
+ then
+ LIVE_MIRROR="http://ftp.debian.org/debian"
+ fi
+
+ # Set debian security mirror
+ if [ -z "${LIVE_MIRROR_SECURITY}" ]
+ then
+ LIVE_MIRROR_SECURITY="http://security.debian.org/debian"
+ fi
+
+ # Set debian sections
+ if [ -z "${LIVE_SECTION}" ]
+ then
+ LIVE_SECTION="main"
+ fi
+
+ # Set netboot server
+ if [ -z "${LIVE_SERVER_ADDRESS}" ]
+ then
+ LIVE_SERVER_ADDRESS="192.168.1.1"
+ fi
+
+ # Set netboot path
+ if [ -z "${LIVE_SERVER_PATH}" ]
+ then
+ LIVE_SERVER_PATH="/srv/debian-live"
+ fi
+
+ # Set templates directory
+ if [ -z "${LIVE_TEMPLATES}" ]
+ then
+ LIVE_TEMPLATES="${BASE}/templates"
+ fi
+}
diff --git a/src/scripts/11bootstrap.sh b/src/scripts/11bootstrap.sh
new file mode 100644
index 0000000..f0a6715
--- /dev/null
+++ b/src/scripts/11bootstrap.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+# make-live - utility to build Debian Live systems
+#
+# Copyright (C) 2006 Daniel Baumann <daniel@debian.org>
+# Copyright (C) 2006 Marco Amadori <marco.amadori@gmail.com>
+#
+# make-live 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.
+
+Bootstrap ()
+{
+ if [ ! -f "${LIVE_ROOT}"/.stage/bootstrap ]
+ then
+ # Create chroot directory
+ if [ ! -d "${LIVE_CHROOT}" ]
+ then
+ mkdir -p "${LIVE_CHROOT}"
+ fi
+
+ # Bootstrap system
+ cdebootstrap --arch="${LIVE_ARCHITECTURE}" --flavour="${LIVE_FLAVOUR}" "${LIVE_DISTRIBUTION}" "${LIVE_CHROOT}" "${LIVE_MIRROR}"
+
+ # Remove package cache
+ rm -rf "${LIVE_CHROOT}"/var/cache/bootstrap
+
+ # Touching stage file
+ if [ ! -d "${LIVE_ROOT}"/.stage ]
+ then
+ mkdir "${LIVE_ROOT}"/.stage
+ fi
+
+ touch "${LIVE_ROOT}"/.stage/bootstrap
+ fi
+}
diff --git a/src/scripts/12patch.sh b/src/scripts/12patch.sh
new file mode 100644
index 0000000..16be344
--- /dev/null
+++ b/src/scripts/12patch.sh
@@ -0,0 +1,95 @@
+#!/bin/sh
+
+# make-live - utility to build Debian Live systems
+#
+# Copyright (C) 2006 Daniel Baumann <daniel@debian.org>
+# Copyright (C) 2006 Marco Amadori <marco.amadori@gmail.com>
+#
+# make-live 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.
+
+Patch_chroot ()
+{
+ # Some maintainer scripts can detect if they are in a chrooted system.
+ # Therefore, we create the needed file.
+
+ case "${1}" in
+ apply)
+ # Create chroot file
+ echo "debian-live" > "${LIVE_CHROOT}"/etc/debian_chroot
+ ;;
+
+ deapply)
+ # Remove chroot file
+ rm -f "${LIVE_CHROOT}"/etc/debian_chroot
+ ;;
+ esac
+}
+
+Patch_network ()
+{
+ # Packages which are manually installed inside the chroot are installed
+ # from the network. Therefore, we need to be able to resolv hosts.
+
+ case "${1}" in
+ apply)
+ # Save host lookup table
+ if [ -f "${LIVE_CHROOT}"/etc/hosts ]
+ then
+ cp "${LIVE_CHROOT}"/etc/hosts "${LIVE_CHROOT}"/etc/hosts.orig
+ fi
+
+ # Save resolver configuration
+ if [ -f "${LIVE_CHROOT}"/etc/resolv.conf ]
+ then
+ cp "${LIVE_CHROOT}"/etc/resolv.conf "${LIVE_CHROOT}"/etc/resolv.conf.orig
+ fi
+
+ # Copy host lookup table
+ if [ -f /etc/hosts ]
+ then
+ cp /etc/hosts "${LIVE_CHROOT}"/etc/hosts
+ fi
+
+ # Copy resolver configuration
+ if [ -f /etc/resolv.conf ]
+ then
+ cp /etc/resolv.conf "${LIVE_CHROOT}"/etc/resolv.conf
+ fi
+ ;;
+
+ deapply)
+ # Restore host lookup table
+ if [ -f "${LIVE_CHROOT}"/etc/hosts.orig ]
+ then
+ mv "${LIVE_CHROOT}"/etc/hosts.orig "${LIVE_CHROOT}"/etc/hosts
+ fi
+
+ # Restore resolver configuration
+ if [ -f "${LIVE_CHROOT}"/etc/resolv.conf.orig ]
+ then
+ mv "${LIVE_CHROOT}"/etc/resolv.conf.orig "${LIVE_CHROOT}"/etc/resolv.conf
+ fi
+ ;;
+ esac
+}
+
+Patch_linux ()
+{
+ # The linux-image package asks interactively for initial ramdisk
+ # creation. Therefore, we preconfigure /etc/kernel-img.conf.
+ # FIXME: preseeding?
+
+ case "${1}" in
+ apply)
+ # Write configuration option
+ echo "do_initrd = Yes" >> "${LIVE_CHROOT}"/etc/kernel-img.conf
+ ;;
+
+ deapply)
+ # Remove configuration file
+ rm -f "${LIVE_CHROOT}"/etc/kernel-img.conf
+ ;;
+ esac
+}
diff --git a/src/scripts/13chroot.sh b/src/scripts/13chroot.sh
new file mode 100644
index 0000000..dd177df
--- /dev/null
+++ b/src/scripts/13chroot.sh
@@ -0,0 +1,116 @@
+#!/bin/sh
+
+# make-live - utility to build Debian Live systems
+#
+# Copyright (C) 2006 Daniel Baumann <daniel@debian.org>
+# Copyright (C) 2006 Marco Amadori <marco.amadori@gmail.com>
+#
+# make-live 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.
+
+Chroot_exec ()
+{
+ # Execute commands chrooted
+ chroot "${LIVE_CHROOT}" /usr/bin/env -i HOME="/root" PATH="/usr/sbin:/usr/bin:/sbin:/bin" TERM="${TERM}" ftp_proxy="${LIVE_PROXY_FTP}" http_proxy="${LIVE_PPROXY_HTTP}" DEBIAN_FRONTEND="noninteractive" DEBIAN_PRIORITY="critical" ${1}
+}
+
+Chroot ()
+{
+ if [ ! -f "${LIVE_ROOT}"/.stage/chroot ]
+ then
+ # Configure chroot
+ Patch_chroot apply
+
+ # Configure network
+ Patch_network apply
+
+ # Configure sources.list
+ echo "deb ${LIVE_MIRROR} ${LIVE_DISTRIBUTION} ${LIVE_SECTION}" > "${LIVE_CHROOT}"/etc/apt/sources.list
+
+ case "${LIVE_DISTRIBUTION}" in
+ "${CODENAME_TESTING}")
+ echo "deb ${LIVE_MIRROR} ${CODENAME_TESTING}-proposed-updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+ echo "deb ${LIVE_MIRROR_SECURITY} ${CODENAME_TESTING}/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+ ;;
+
+ "${CODENAME_STABLE}")
+ echo "deb ${LIVE_MIRROR_SECURITY} ${CODENAME_STABLE}/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+ ;;
+
+ "${CODENAME_OLDSTABLE}")
+ echo "deb ${LIVE_MIRROR_SECURITY} ${CODENAME_OLDSTABLE}/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+ ;;
+ esac
+
+ Chroot_exec "apt-get update"
+
+ # Install secure apt
+ if [ "${LIVE_DISTRIBUTION}" = "${CODENAME_TESTING}" ] || [ "${LIVE_DISTRIBUTION}" = "${CODENAME_UNSTABLE}" ]
+ then
+ Chroot_exec "apt-get install --yes --force-yes debian-archive-keyring"
+ fi
+
+ # Update indices
+ Chroot_exec "apt-get update"
+
+ # Configure linux-image
+ Patch_linux apply
+
+ # Install linux-image, modules and casper
+ Chroot_exec "apt-get install --yes linux-image-2.6-${LIVE_KERNEL} squashfs-modules-2.6-${LIVE_KERNEL} unionfs-modules-2.6-${LIVE_KERNEL} casper"
+
+ # Rebuild initial ramdisk
+ Chroot_exec "dpkg-reconfigure `basename ${LIVE_CHROOT}/var/lib/dpkg/info/linux-image-2.6.*-${LIVE_KERNEL}.postinst .postinst`"
+
+ # Deconfigure linux-image
+ Patch_linux deapply
+
+ # Install packages list
+ if [ -n "${LIVE_PACKAGE_LIST}" ]
+ then
+ Chroot_exec "apt-get install --yes `cat ${LIVE_PACKAGE_LIST}`"
+ fi
+
+ # Install extra packages
+ if [ -n "${LIVE_PACKAGES}" ]
+ then
+ Chroot_exec "apt-get install --yes ${LIVE_PACKAGES}"
+ fi
+
+ # Copy external directory into the chroot
+ if [ -d "${LIVE_INCLUDE_CHROOT}" ]
+ then
+ cd "${LIVE_INCLUDE_CHROOT}"
+ find . | cpio -pumd "${LIVE_CHROOT}"
+ cd "${OLDPWD}"
+ fi
+
+ # Execute extra command in the chroot
+ if [ -n "${LIVE_HOOK}" ]
+ then
+ Chroot_exec "${LIVE_HOOK}"
+ fi
+
+ # Clean apt packages cache
+ rm -f "${LIVE_CHROOT}"/var/cache/apt/archives/*.deb
+ rm -f "${LIVE_CHROOT}"/var/cache/apt/archives/partial/*.deb
+
+ # Clean apt indices cache
+ rm -f "${LIVE_CHROOT}"/var/cache/apt/*pkgcache.bin
+
+ # Remove cdebootstrap packages cache
+ rm -rf "${LIVE_CHROOT}"/var/cache/bootstrap
+
+ # Deconfigure network
+ Patch_network deapply
+
+ # Deconfigure chroot
+ Patch_chroot deapply
+
+ # Touching stage file
+ touch "${LIVE_ROOT}"/.stage/chroot
+
+ echo "done."
+ fi
+}
diff --git a/src/scripts/21image.sh b/src/scripts/21image.sh
new file mode 100644
index 0000000..51be0a1
--- /dev/null
+++ b/src/scripts/21image.sh
@@ -0,0 +1,161 @@
+#!/bin/sh
+
+# make-live - utility to build Debian Live systems
+#
+# Copyright (C) 2006 Daniel Baumann <daniel@debian.org>
+# Copyright (C) 2006 Marco Amadori <marco.amadori@gmail.com>
+#
+# make-live 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.
+
+Md5sum ()
+{
+ # Calculating md5sums
+ cd "${LIVE_ROOT}"/image
+ find . -type f -print0 | xargs -0 md5sum > "${LIVE_ROOT}"/md5sum.txt
+ 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}"/image
+}
+
+Mkisofs ()
+{
+ if [ "${LIVE_ARCHITECTURE}" = "amd64" ] || [ "${LIVE_ARCHITECTURE}" = "i386" ]
+ then
+ mkisofs -A "Debian Live" -p "Debian Live; http://live.debian.net/; live@lists.debian-unofficial.org" -publisher "Debian Live; http://live.debian.net/; live@lists.debian-unofficial.org" -o "${LIVE_ROOT}"/image.iso -r -J -l -V "Debian Live `date +%Y%m%d`" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table "${LIVE_ROOT}"/image ${LIVE_INCLUDE_IMAGE}
+ else
+ echo "W: Bootloader on your architecture not yet supported (Continuing in 5 seconds)."
+ sleep 5
+
+ # Create image
+ mkisofs -o "${LIVE_ROOT}"/image.iso -r -J -l -V "Debian Live `date +%Y%m%d`" "${LIVE_ROOT}"/image ${LIVE_INCLUDE_IMAGE}
+ fi
+}
+
+Linuximage ()
+{
+ case "${1}" in
+ iso)
+ # Copy linux-image
+ cp "${LIVE_CHROOT}"/boot/vmlinuz-* "${LIVE_ROOT}"/image/isolinux/vmlinuz
+ cp "${LIVE_CHROOT}"/boot/initrd.img-* "${LIVE_ROOT}"/image/isolinux/initrd.gz
+ ;;
+
+ net)
+ # Copy linux-image
+ cp "${LIVE_ROOT}"/chroot/boot/vmlinuz-* "${LIVE_ROOT}"/tftpboot/vmlinuz
+ cp "${LIVE_ROOT}"/chroot/boot/initrd.img-* "${LIVE_ROOT}"/tftpboot/initrd.gz
+ ;;
+ esac
+}
+
+Memtest ()
+{
+ if [ "${LIVE_ARCHITECTURE}" = "amd64" ] || [ "${LIVE_ARCHITECTURE}" = "i386" ]
+ then
+ # Install memtest
+ Patch_network apply
+ Chroot_exec "apt-get install --yes memtest86+"
+
+ case "$1" in
+ iso)
+ # Copy memtest
+ cp "${LIVE_ROOT}"/chroot/boot/memtest86+.bin "${LIVE_ROOT}"/image/isolinux/memtest
+ ;;
+
+ net)
+ # Copy memtest
+ cp "${LIVE_ROOT}"/chroot/boot/memtest86+.bin "${LIVE_ROOT}"/tftpboot/memtest
+ ;;
+ esac
+
+ # Remove memtest
+ Chroot_exec "apt-get remove --purge --yes memtest86+"
+ Patch_network deapply
+ fi
+}
+
+Genrootfs ()
+{
+ case "${LIVE_FILESYSTEM}" in
+ ext2)
+ DU_DIM="`du -ks ${LIVE_CHROOT} | cut -f1`"
+ 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}"/image/casper/filesystem.ext2
+ ;;
+
+ plain)
+ cd "${LIVE_CHROOT}"
+ find . | cpio -pumd "${LIVE_ROOT}"/image/casper/filesystem.dir
+ cd "${OLDPWD}"
+ ;;
+
+ squashfs)
+ if [ -f "${LIVE_ROOT}"/image/casper/filesystem.squashfs ]
+ then
+ rm "${LIVE_ROOT}"/image/casper/filesystem.squashfs
+ fi
+
+ mksquashfs "${LIVE_CHROOT}" "${LIVE_ROOT}"/image/casper/filesystem.squashfs
+ ;;
+ esac
+}
+
+Syslinux ()
+{
+ if [ "${LIVE_ARCHITECTURE}" = "amd64" ] || [ "${LIVE_ARCHITECTURE}" = "i386" ]
+ then
+ # Install syslinux
+ Patch_network apply
+ Chroot_exec "apt-get install --yes syslinux"
+
+ case "${1}" in
+ iso)
+ # Copy syslinux
+ mkdir -p "${LIVE_ROOT}"/image/isolinux
+ cp "${LIVE_CHROOT}"/usr/lib/syslinux/isolinux.bin "${LIVE_ROOT}"/image/isolinux
+
+ # Install syslinux templates
+ cp -r "${LIVE_TEMPLATES}"/syslinux/* \
+ "${LIVE_ROOT}"/image/isolinux
+ rm -f "${LIVE_ROOT}"/image/isolinux/pxelinux.cfg
+
+ # Configure syslinux templates
+ sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" "${LIVE_ROOT}"/image/isolinux/isolinux.cfg
+ sed -i -e "s/LIVE_DATE/`date +%Y%m%d`/" "${LIVE_ROOT}"/image/isolinux/f1.txt
+ sed -i -e "s/LIVE_VERSION/${VERSION}/" "${LIVE_ROOT}"/image/isolinux/f10.txt
+ ;;
+
+ net)
+ # Copy syslinux
+ mkdir -p "${LIVE_ROOT}"/tftpboot
+ cp "${LIVE_ROOT}"/chroot/usr/lib/syslinux/pxelinux.0 "${LIVE_ROOT}"/tftpboot
+
+ # Install syslinux templates
+ mkdir -p "${LIVE_ROOT}"/tftpboot/pxelinux.cfg
+ cp -r "${LIVE_TEMPLATES}"/syslinux/* \
+ "${LIVE_ROOT}"/tftpboot/pxelinux.cfg
+ mv "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/pxelinux.cfg "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/default
+ rm -f "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/isolinux.*
+
+ # 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_DATE/`date +%Y%m%d`/" "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/f1.txt
+ sed -i -e "s/LIVE_VERSION/${VERSION}/" "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/f10.txt
+ ;;
+ esac
+
+ # Remove syslinux
+ Chroot_exec "apt-get remove --purge --yes syslinux"
+ Patch_network deapply
+ fi
+}
diff --git a/src/scripts/22iso.sh b/src/scripts/22iso.sh
new file mode 100644
index 0000000..bb67ef9
--- /dev/null
+++ b/src/scripts/22iso.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+# make-live - utility to build Debian Live systems
+#
+# Copyright (C) 2006 Daniel Baumann <daniel@debian.org>
+# Copyright (C) 2006 Marco Amadori <marco.amadori@gmail.com>
+#
+# make-live 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.
+
+Iso ()
+{
+ mkdir -p "${LIVE_ROOT}"/image/casper
+
+ # Generating rootfs image
+ Genrootfs
+
+ # Installing syslinux
+ Syslinux iso
+
+ # Installing linux-image
+ Linuximage iso
+
+ # Installing memtest
+ Memtest iso
+
+ # Installing templates
+ cp -r "${LIVE_TEMPLATES}"/iso/* "${LIVE_ROOT}"/image
+
+ # Calculating md5sums
+ Md5sum
+
+ # Creating image
+ Mkisofs
+}
diff --git a/src/scripts/23net.sh b/src/scripts/23net.sh
new file mode 100644
index 0000000..816d05a
--- /dev/null
+++ b/src/scripts/23net.sh
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+# make-live - utility to build Debian Live systems
+#
+# Copyright (C) 2006 Daniel Baumann <daniel@debian.org>
+# Copyright (C) 2006 Marco Amadori <marco.amadori@gmail.com>
+#
+# make-live 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.
+
+Net ()
+{
+ # Installing smbfs
+ Chroot_exec "apt-get install --yes smbfs"
+
+ if [ "${LIVE_ARCHITECTURE}" = "amd64" ] || [ "${LIVE_ARCHITECTURE}" = "i386" ]
+ then
+ if [ ! -d "${LIVE_CHROOT}"/etc/initramfs-tools ]
+ then
+ mkdir "${LIVE_CHROOT}"/etc/initramfs-tools
+ fi
+
+ # Configuring initramfs for NFS
+cat >> "${LIVE_CHROOT}"/etc/initramfs-tools/initramfs.conf << EOF
+MODULES=netboot
+BOOT=nfs
+NFSROOT=auto
+EOF
+ Chroot_exec "update-initramfs -tu"
+ fi
+
+ # Generating rootfs
+ Genrootfs
+
+ # Installing syslinux
+ Syslinux net
+
+ # Installing linux-image
+ Linuximage net
+
+ # Installing memtest
+ Memtest net
+
+ # Creating tarball
+ LIVE_BASENAME=`basename "${LIVE_ROOT}"`
+ LIVE_BASE_SERVER_PATH=`basename "${LIVE_SERVER_PATH}"`
+ cd "${LIVE_ROOT}" && \
+ mv image "${LIVE_BASE_SERVER_PATH}" && \
+ cd .. && \
+ tar cfz netboot.tar.gz "${LIVE_BASENAME}/${LIVE_BASE_SERVER_PATH}" "${LIVE_BASENAME}/tftpboot" && \
+ mv netboot.tar.gz "${LIVE_ROOT}" && \
+ cd "${OLDPWD}" && \
+ mv "${LIVE_BASE_SERVER_PATH}" image
+}