summaryrefslogtreecommitdiff
path: root/src/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripts')
-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
8 files changed, 690 insertions, 0 deletions
diff --git a/src/scripts/01init.sh b/src/scripts/01init.sh
new file mode 100644
index 000000000..6947f6f39
--- /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 000000000..9a0342da3
--- /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 000000000..f0a671563
--- /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 000000000..16be344f1
--- /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 000000000..dd177dfb9
--- /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 000000000..51be0a106
--- /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 000000000..bb67ef9b4
--- /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 000000000..816d05aa7
--- /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
+}