From 262e501463f4cc8bba690a1ef7cf0887cbfaa8cf Mon Sep 17 00:00:00 2001
From: Daniel Baumann <daniel@debian.org>
Date: Sun, 23 Sep 2007 10:04:22 +0200
Subject: Adding live-package 0.99.5-1.

---
 ChangeLog                 |  19 ++-
 Makefile                  |   7 ++
 debian/changelog          |   7 ++
 debian/control            |   2 +-
 doc/faq.txt               |   9 ++
 doc/man/make-live.8       |  32 +++--
 doc/man/make-live.conf.8  |  10 +-
 src/config                |  12 +-
 src/lists/gnome           |  16 ++-
 src/lists/gnome-core      |  13 +-
 src/lists/gnome-full      |  13 +-
 src/lists/kde             |  13 +-
 src/lists/kde-core        |  13 +-
 src/lists/kde-core-i18n   |  32 ++++-
 src/lists/kde-extra       |  19 ++-
 src/lists/kde-extra-i18n  |  51 +++++++-
 src/lists/kde-full        |  16 ++-
 src/lists/kde-full-i18n   |  48 +++++++-
 src/lists/kde-i18n        |  32 ++++-
 src/lists/minimal         |   4 +
 src/lists/standard        |   7 ++
 src/lists/standard-i18n   |  14 ++-
 src/lists/x11             |   9 ++
 src/lists/x11-core        |   9 ++
 src/lists/xfce            |  13 +-
 src/main.sh               |  84 +++++++++----
 src/scripts/02defaults.sh |  38 +++++-
 src/scripts/13hack.sh     |   2 +-
 src/scripts/14chroot.sh   |  15 +--
 src/scripts/21image.sh    | 299 ++++++++++++++++++++++++++++++----------------
 src/scripts/22iso.sh      |  65 +++++++---
 src/scripts/23net.sh      |  98 +++++++++------
 32 files changed, 790 insertions(+), 231 deletions(-)
 create mode 100644 doc/faq.txt
 create mode 100644 src/lists/minimal
 create mode 100644 src/lists/standard

diff --git a/ChangeLog b/ChangeLog
index af57663..39dfaff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,22 @@
+2006-09-03 Daniel Baumann <daniel@debian.org>
+
+	* Added dist parameter to easily pull images for live.debian.net.
+	* Added "--output" to specify the image name prefix.
+	* Exclude iso templates for minimal flavour.
+
+2006-09-02 Daniel Baumann <daniel@debian.org>
+
+	* Added experimental as distribution.
+	* Added source image generation.
+	* Using dpkg instead of dpkg-architecture, removed dpkg-dev dependency.
+
 2006-08-31 Daniel Baumann <daniel@debian.org>
 
+	* Added "--disable-generic-indices" and "--enable-generic-indices".
+	* Fixed i18n lists.
+	* Rewritten all lists, comments are now possible.
+	* Lists must be now explicitly given with --package-list, no longer as
+	  last argument of the make-live call.
 	* Setting default sources.list while the image generation, restoring
 	  customized ones afterwards.
 
@@ -37,7 +54,7 @@
 	* Reorganised sources.
 	* Added staging support.
 	* Cleaned up parameter names.
-	* testing is now supported, switched default distribution to etch.
+	* testing is now supported.
 
 2006-08-02 Marco Amadori <marco.amadori@gmail.com>
 
diff --git a/Makefile b/Makefile
index a6976d2..2ea7ec0 100644
--- a/Makefile
+++ b/Makefile
@@ -21,6 +21,10 @@ install:
 	@# Install templates
 	cp -r templates $(DESTDIR)/usr/share/make-live
 
+	@# Install documentation
+	install -d -m 0755 $(DESTDIR)/usr/share/doc/live-package
+	install -m 0644 doc/*.txt $(DESTDIR)/usr/share/doc/live-package
+
 	@# Install manpages
 	install -d -m 0755 $(DESTDIR)/usr/share/man/man8
 	install -m 0644 doc/man/*.8  $(DESTDIR)/usr/share/man/man8
@@ -36,6 +40,9 @@ uninstall:
 	@# Remove shared data
 	rm -rf $(DESTDIR)/usr/share/make-live
 
+	@# Remove documentation
+	rm -rf $(DESTDIR)/usr/share/doc/live-package
+
 	@# Remove manpages
 	rm -f $(DESTDIR)/usr/share/man/man8/make-live.*
 
diff --git a/debian/changelog b/debian/changelog
index 467c34a..1b92d49 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+live-package (0.99.5-1) unstable; urgency=low
+
+  * New upstream release.
+  * Set maintainer to the project list.
+
+ -- Daniel Baumann <daniel@debian.org>  Mon,  4 Sep 2006 00:00:00 +0200
+
 live-package (0.99.4-1) unstable; urgency=low
 
   * New upstream release:
diff --git a/debian/control b/debian/control
index db9ea44..3d4691d 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Standards-Version: 3.7.2
 
 Package: live-package
 Architecture: all
-Depends: cdebootstrap (>= 0.3.10), dpkg-dev, genext2fs, mkisofs, squashfs-tools
+Depends: cdebootstrap (>= 0.3.10), genext2fs, mkisofs, squashfs-tools
 Provides: make-live
 Description: utility to build Debian Live systems
  make-live is a utility to build Debian Live systems. It takes a Debian mirror
diff --git a/doc/faq.txt b/doc/faq.txt
new file mode 100644
index 0000000..e83dcd6
--- /dev/null
+++ b/doc/faq.txt
@@ -0,0 +1,9 @@
+Debian Live Framework: Frequently Asked Questions (FAQ)
+=======================================================
+
+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 casper is 'live'.
diff --git a/doc/man/make-live.8 b/doc/man/make-live.8
index d4585f0..5331cd1 100644
--- a/doc/man/make-live.8
+++ b/doc/man/make-live.8
@@ -1,4 +1,4 @@
-.TH MAKE-LIVE 8 "Mon, 28 Aug 2006" "0.99.4" "Debian Live framework"
+.TH MAKE-LIVE 8 "Mon,  4 Sep 2006" "0.99.5" "Debian Live framework"
 
 .SH NAME
 make-live \- utility to build Debian Live systems
@@ -31,10 +31,10 @@ make-live \- utility to build Debian Live systems
 .IR URL \|]
 .RB [\| \-\-mirror-security
 .IR URL \|]
-.RB [\| \-p \||\| \-\-packages
+.RB [\| \-\-packages
 .IR PACKAGE \||\| \|"PACKAGES\|" \|]
-.RB [\| \-\-package-list
-.IR FILE \|]
+.RB [\| \-p \||\| \-\-package-list
+.IR LIST \||\| FILE \|]
 .RB [\| \-\-proxy-ftp
 .IR URL \|]
 .RB [\| \-\-proxy-http
@@ -51,7 +51,10 @@ make-live \- utility to build Debian Live systems
 .IR DIRECTORY \|]
 .RB [\| \-t \||\| \-\-type
 .IR TYPE \|]
-.RI [\| LIST \|]
+.RB [\| \-\-with-generic-indices \|]
+.RB [\| \-\-without-generic-indices \|]
+.RB [\| \-\-with-source \|]
+.RB [\| \-\-without-source \|]
 .PP
 .B make-live
 .RB \-h \||\| \-\-help
@@ -106,11 +109,11 @@ specifies the debian mirror where make-live will download the packages from. Ins
 .BI "\-\-mirror-security" URL
 specifies the debian security mirror where make-live will download the packages from. Instead of this flag, the environment variable LIVE_MIRROR_SECURITY can be used (Default: http://security.debian.org/debian).
 .TP
-.BI "\-p, \-\-packages " PACKAGE \||\| \|"PACKAGES\|"
+.BI "\-\-packages " PACKAGE \||\| \|"PACKAGES\|"
 specifies a list of packages to install into the chroot. Instead of this flag, the environment variable LIVE_PACKAGES can be used (Default: empty).
 .TP
-.BI "\-\-package-list " FILE
-specifies an external package list file, one package for each line. It overrides list option. Instead of this flag, the environment variable LIVE_PACKAGE_LIST can be used (Default: empty).
+.BI "\-p, \-\-package-list " FILE
+specifies an external package list file, one package for each line. It overrides list option. Instead of this flag, the environment variable LIVE_PACKAGE_LIST can be used (Default: standard).
 .TP
 .BI "\-\-proxy-ftp " URL
 specifies the value of ftp_proxy inside the chrooted environment. Instead of this flag, the environment variable LIVE_PROXY_FTP can be used (Default: empty).
@@ -136,6 +139,19 @@ specifies a templates directory to use instead of the default one. Instead of th
 .BI "\-t, \-\-type " TYPE
 specifies the image type to generate. Currently, only iso and net are available. Instead of this flag, the environment variable LIVE_TYPE can be used (Default: iso).
 .TP
+.B \-\-with-generic-indices
+enables use of generic Debian package indices. Instead of this flag, the environment variable LIVE_GENERIC_INDICES can be used (Default: yes).
+.TP
+.B \-\-without-generic-indices
+disables use of generic Debian package indices. Instead of this flag, the environment variable LIVE_GENERIC_INDICES can be used (Default: yes).
+.TP
+.B \-\-with-source
+enables generation of source images. Instead of this flag, the environment variable LIVE_SOURCE can be used (Default: no).
+.TP
+.B \-\-without-source
+disables generation of source images. Instead of this flag, the environment variable LIVE_SOURCE can be used (Default: no).
+.PP
+.TP
 .B \-h, \-\-help
 display help and exit
 .TP
diff --git a/doc/man/make-live.conf.8 b/doc/man/make-live.conf.8
index 30b6bd3..f761da3 100644
--- a/doc/man/make-live.conf.8
+++ b/doc/man/make-live.conf.8
@@ -1,4 +1,4 @@
-.TH MAKE-LIVE.CONF 8 "Mon, 28 Aug 2006" "0.99.4" "Debian Live framework"
+.TH MAKE-LIVE.CONF 8 "Mon,  4 Sep 2006" "0.99.5" "Debian Live framework"
 
 .SH NAME
 make-live.conf \- configuration file for make-live(8)
@@ -27,6 +27,9 @@ specifies the bootstrap flavour. This can be either standard (default) or minima
 specifies the filesystem to be used for the root filesystem image
 (Default: squashfs).
 .TP
+.B LIVE_GENERIC_INDICES
+specifies if generic Debian indices should be used (Default: enable).
+.TP
 .B LIVE_FTPPROXY
 specifies the value of ftp_proxy inside the chrooted environment. Instead of this environment variable, the flag \-\-ftp-proxy can be used (Default: empty).
 .TP
@@ -45,11 +48,10 @@ specifies the debian mirror where make-live will download the packages from. Ins
 specifies the archive signing key. Instead of this environment variable, the flav \-\-mirror-key can be used (Default: http://ftp-master.debian.org/ziyi_key_2006.asc).
 .TP
 .B LIVE_PACKAGES
-specifies a list of packages to install into the chroot. Instead of this environment variable, the flag \-p, \-\-packakges can be used (Default: empty).
+specifies a list of packages to install into the chroot. Instead of this environment variable, the flag \-\-packakges can be used (Default: empty).
 .TP
 .B LIVE_PACKAGE_LIST
-specifies a file which contains a list of packages to install, separated by
-newlines, if LIVE_PACKAGE_LIST exists, default LIST option will be ignored.
+specifies a file which contains a list of packages to install.
 .TP
 .B LIVE_PROXY_FTP
 specifies the value of ftp_proxy inside the chrooted environment. Instead of this environment variable, the flag \-\-ftp-proxy can be used (Default: empty).
diff --git a/src/config b/src/config
index 01b1c81..75b8761 100644
--- a/src/config
+++ b/src/config
@@ -49,10 +49,10 @@
 #LIVE_MIRROR_SECURITY="http://security.debian.org/"
 
 # Packages			(Default: empty)
-LIVE_PACKAGES="cdebootstrap less locales screen sudo vim"
+#LIVE_PACKAGES=""
 
-# Package list			(Default: empty)
-#LIVE_PACKAGE_LIST=""
+# Package list			(Default: standard)
+#LIVE_PACKAGE_LIST="standard"
 
 # Chroots ftp_proxy		(Default: empty)
 #LIVE_PROXY_FTP=""
@@ -71,3 +71,9 @@ LIVE_PACKAGES="cdebootstrap less locales screen sudo vim"
 
 # Image templates		(Default: /usr/share/make-live/templates)
 #LIVE_TEMPLATES="/usr/share/make-live/templates"
+
+# Generic package indices	(Default: no)
+#LIVE_GENERIC_INDICES="no"
+
+# Source images			(Default: no)
+#LIVE_SOURCE="no"
diff --git a/src/lists/gnome b/src/lists/gnome
index c8b48f0..3946fe4 100644
--- a/src/lists/gnome
+++ b/src/lists/gnome
@@ -1 +1,15 @@
-gnome-desktop-environment gdm-themes gnome-cups-manager gnome-themes-extras rhythmbox synaptic gnome-screensaver gdm x-window-system-core
+# /usr/share/make-live/lists/gnome - package list for make-live(8)
+
+# Minimal
+sudo
+
+# Standard
+locales
+
+# GNOME
+gdm gdm-themes gnome-desktop-environment gnome-cups-manager gnome-screensaver
+gnome-themes-extras
+
+rhythmbox synaptic
+
+x-window-system-core
diff --git a/src/lists/gnome-core b/src/lists/gnome-core
index e751336..86aedb6 100644
--- a/src/lists/gnome-core
+++ b/src/lists/gnome-core
@@ -1 +1,12 @@
-gnome-core gdm x-window-system-core
+# /usr/share/make-live/lists/gnome-core - package list for make-live(8)
+
+# Minimal
+sudo
+
+# Standard
+locales
+
+# GNOME Core
+gdm gnome-core
+
+x-window-system-core
diff --git a/src/lists/gnome-full b/src/lists/gnome-full
index 50e8607..a2b8157 100644
--- a/src/lists/gnome-full
+++ b/src/lists/gnome-full
@@ -1 +1,12 @@
-gnome gdm x-window-system-core
+# /usr/share/make-live/lists/gnome-full - package list for make-live(8)
+
+# Minimal
+sudo
+
+# Standard
+locales
+
+# GNOME Full
+gdm gnome
+
+x-window-system-core
diff --git a/src/lists/kde b/src/lists/kde
index 7918920..88f95aa 100644
--- a/src/lists/kde
+++ b/src/lists/kde
@@ -1 +1,12 @@
-kde kdm x-window-system-core
+# /usr/share/make-live/lists/kde - package list for make-live(8)
+
+# Minimal
+sudo
+
+# Standard
+locales
+
+# KDE
+kde kdm
+
+x-window-system-core
diff --git a/src/lists/kde-core b/src/lists/kde-core
index f1f4c7c..51365ba 100644
--- a/src/lists/kde-core
+++ b/src/lists/kde-core
@@ -1 +1,12 @@
-kde-core kdm x-window-system-core
+# /usr/share/make-live/lists/kde-core - package list for make-live(8)
+
+# Minimal
+sudo
+
+# Standard
+locales
+
+# KDE Core
+kde-core kdm
+
+x-window-system-core
diff --git a/src/lists/kde-core-i18n b/src/lists/kde-core-i18n
index 4159acc..f41be9b 100644
--- a/src/lists/kde-core-i18n
+++ b/src/lists/kde-core-i18n
@@ -1 +1,31 @@
-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
+# /usr/share/make-live/lists/kde-core-i18n - package list for make-live(8)
+
+# Minimal
+sudo
+
+# Standard
+locales
+
+# Standard i18n
+manpages manpages-dev manpages-de manpages-de-dev manpages-es manpages-es-extra
+manpages-fi manpages-fr manpages-fr-dev manpages-fr-extra 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
+
+# KDE Core
+kde-core kdm
+
+x-window-system-core
+
+# KDE i18n
+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 kde-i18n-zhtw
diff --git a/src/lists/kde-extra b/src/lists/kde-extra
index 1180267..12d37f9 100644
--- a/src/lists/kde-extra
+++ b/src/lists/kde-extra
@@ -1 +1,18 @@
-kde koffice kde-extras kdm x-window-system-core
+# /usr/share/make-live/lists/kde-extra - package list for make-live(8)
+
+# Minimal
+sudo
+
+# Standard
+locales
+
+# KDE
+kde kdm
+
+x-window-system-core
+
+# KDE Full
+koffice
+
+# KDE Extra
+kde-extras
diff --git a/src/lists/kde-extra-i18n b/src/lists/kde-extra-i18n
index ca5faff..cfe990b 100644
--- a/src/lists/kde-extra-i18n
+++ b/src/lists/kde-extra-i18n
@@ -1 +1,50 @@
-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
+# /usr/share/make-live/lists/kde-extra-i18n - package list for make-live(8)
+
+# Minimal
+sudo
+
+# Standard
+locales
+
+# Standard i18n
+manpages manpages-dev manpages-de manpages-de-dev manpages-es manpages-es-extra
+manpages-fi manpages-fr manpages-fr-dev manpages-fr-extra 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
+
+# KDE
+kde kdm
+
+x-window-system-core
+
+# KDE i18n
+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 kde-i18n-zhtw
+
+# KDE Full
+koffice
+
+# KDE Full i18n
+koffice-i18n-af koffice-i18n-ar koffice-i18n-bg koffice-i18n-br koffice-i18n-bs
+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-eu koffice-i18n-fi koffice-i18n-fr koffice-i18n-ga
+koffice-i18n-he koffice-i18n-hi koffice-i18n-hu koffice-i18n-it koffice-i18n-ja
+koffice-i18n-lt koffice-i18n-mk koffice-i18n-ms koffice-i18n-nb koffice-i18n-nl
+koffice-i18n-nn koffice-i18n-pl koffice-i18n-pt koffice-i18n-ptbr
+koffice-i18n-ro koffice-i18n-ru koffice-i18n-se koffice-i18n-sk koffice-i18n-sl
+koffice-i18n-sr koffice-i18n-srlatin koffice-i18n-sv koffice-i18n-ta
+koffice-i18n-tg koffice-i18n-tr koffice-i18n-uk koffice-i18n-uz
+koffice-i18n-zhcn koffice-i18n-zhtw
+
+# KDE Extra
+kde-extras
diff --git a/src/lists/kde-full b/src/lists/kde-full
index 13fe000..5ca4926 100644
--- a/src/lists/kde-full
+++ b/src/lists/kde-full
@@ -1 +1,15 @@
-kde koffice kdm x-window-system-core
+# /usr/share/make-live/lists/kde-full - package list for make-live(8)
+
+# Minimal
+sudo
+
+# Standard
+locales
+
+# KDE
+kde kdm
+
+x-window-system-core
+
+# KDE Full
+koffice
diff --git a/src/lists/kde-full-i18n b/src/lists/kde-full-i18n
index 097bc27..92aa5b1 100644
--- a/src/lists/kde-full-i18n
+++ b/src/lists/kde-full-i18n
@@ -1 +1,47 @@
-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
+# /usr/share/make-live/lists/kde-full-i18n - package list for make-live(8)
+
+# Minimal
+sudo
+
+# Standard
+locales
+
+# Standard i18n
+manpages manpages-dev manpages-de manpages-de-dev manpages-es manpages-es-extra
+manpages-fi manpages-fr manpages-fr-dev manpages-fr-extra 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
+
+# KDE
+kde kdm
+
+x-window-system-core
+
+# KDE i18n
+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 kde-i18n-zhtw
+
+# KDE Full
+koffice
+
+# KDE Full i18n
+koffice-i18n-af koffice-i18n-ar koffice-i18n-bg koffice-i18n-br koffice-i18n-bs
+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-eu koffice-i18n-fi koffice-i18n-fr koffice-i18n-ga
+koffice-i18n-he koffice-i18n-hi koffice-i18n-hu koffice-i18n-it koffice-i18n-ja
+koffice-i18n-lt koffice-i18n-mk koffice-i18n-ms koffice-i18n-nb koffice-i18n-nl
+koffice-i18n-nn koffice-i18n-pl koffice-i18n-pt koffice-i18n-ptbr
+koffice-i18n-ro koffice-i18n-ru koffice-i18n-se koffice-i18n-sk koffice-i18n-sl
+koffice-i18n-sr koffice-i18n-srlatin koffice-i18n-sv koffice-i18n-ta
+koffice-i18n-tg koffice-i18n-tr koffice-i18n-uk koffice-i18n-uz
+koffice-i18n-zhcn koffice-i18n-zhtw
diff --git a/src/lists/kde-i18n b/src/lists/kde-i18n
index aa2b4ba..fffd35f 100644
--- a/src/lists/kde-i18n
+++ b/src/lists/kde-i18n
@@ -1 +1,31 @@
-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
+# /usr/share/make-live/lists/kde-i18n - package list for make-live(8)
+
+# Minimal
+sudo
+
+# Standard
+locales
+
+# Standard i18n
+manpages manpages-dev manpages-de manpages-de-dev manpages-es manpages-es-extra
+manpages-fi manpages-fr manpages-fr-dev manpages-fr-extra 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
+
+# KDE
+kde kdm
+
+x-window-system-core
+
+# KDE i18n
+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 kde-i18n-zhtw
diff --git a/src/lists/minimal b/src/lists/minimal
new file mode 100644
index 0000000..cb9ec88
--- /dev/null
+++ b/src/lists/minimal
@@ -0,0 +1,4 @@
+# /usr/share/make-live/lists/minimal - package list for make-live(8)
+
+# Minimal
+sudo
diff --git a/src/lists/standard b/src/lists/standard
new file mode 100644
index 0000000..209291f
--- /dev/null
+++ b/src/lists/standard
@@ -0,0 +1,7 @@
+# /usr/share/make-live/lists/standard - package list for make-live(8)
+
+# Minimal
+sudo
+
+# Standard
+locales
diff --git a/src/lists/standard-i18n b/src/lists/standard-i18n
index 6530405..11b5e15 100644
--- a/src/lists/standard-i18n
+++ b/src/lists/standard-i18n
@@ -1 +1,13 @@
-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
+# /usr/share/make-live/lists/standard-i18n - package list for make-live(8)
+
+# Minimal
+sudo
+
+# Standard
+locales
+
+# Standard i18n
+manpages manpages-dev manpages-de manpages-de-dev manpages-es manpages-es-extra
+manpages-fi manpages-fr manpages-fr-dev manpages-fr-extra 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
index db285e5..124b3e4 100644
--- a/src/lists/x11
+++ b/src/lists/x11
@@ -1 +1,10 @@
+# /usr/share/make-live/lists/x11 - package list for make-live(8)
+
+# Minimal
+sudo
+
+# Standard
+locales
+
+# X11
 xdm x-window-system
diff --git a/src/lists/x11-core b/src/lists/x11-core
index dda2615..23de7d8 100644
--- a/src/lists/x11-core
+++ b/src/lists/x11-core
@@ -1 +1,10 @@
+# /usr/share/make-live/lists/x11-core - package list for make-live(8)
+
+# Minimal
+sudo
+
+# Standard
+locales
+
+# X11
 xdm x-window-system-core
diff --git a/src/lists/xfce b/src/lists/xfce
index 81cec99..ff9fcd4 100644
--- a/src/lists/xfce
+++ b/src/lists/xfce
@@ -1 +1,12 @@
-xfce4 gdm x-window-system-core
+# /usr/share/make-live/lists/xfce - package list for make-live(8)
+
+# Minimal
+sudo
+
+# Standard
+locales
+
+# Xfce
+gdm xfce4
+
+x-window-system-core
diff --git a/src/main.sh b/src/main.sh
index b0405e0..5d27859 100755
--- a/src/main.sh
+++ b/src/main.sh
@@ -28,7 +28,7 @@ set -e
 BASE="/usr/share/make-live"
 CONFIG="/etc/make-live.conf"
 PROGRAM="`basename ${0}`"
-VERSION="0.99.4"
+VERSION="0.99.5"
 
 CODENAME_OLDSTABLE="woody"
 CODENAME_STABLE="sarge"
@@ -45,16 +45,16 @@ 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} [-a|--architecture ARCHITECTURE] [-b|--bootappend KERNEL_PARAMETER|\"KERNEL_PARAMETERS\"] [--config FILE] [-c|--chroot DIRECTORY] [-d|--distribution DISTRIBUTION] [--disable-generic-indices] [--enable-generic-indices] [--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] [--packages PACKAGE|\"PACKAGES\"] [-p|--package-list 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]"
 	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 "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, 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 "  Distributions: testing, unstable, experimental or etch, sid".
 	echo "  Filesystems: ext2, plain, squashfs."
 	echo "  Boostrap flavours: minimal, standard."
 	echo "  Kernel flavours: Debian Kernel flavour of your architecture."
@@ -66,6 +66,8 @@ Help ()
 	echo "  --config: specifies an alternate configuration file."
 	echo "  -c, --chroot: specifies the chroot directory."
 	echo "  -d, --distribution: specifies the debian distribution."
+	echo "  --disable-generic-indices: disables generic debian package indices."
+	echo "  --enable-generic-indices: enables generic debian package indices (default)."
 	echo "  --filesystem: specifies the chroot filesystem."
 	echo "  -f, --flavour: specifies the bootstrap flavour."
 	echo "  --hook: specifies extra command(s)."
@@ -74,8 +76,8 @@ Help ()
 	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 "  --packages: specifies aditional packages."
+	echo "  -p, --package-list: specifies additonal package list."
 	echo "  -r, --root: specifies build root."
 	echo "  --proxy-ftp: specifies \${ftp_proxy}."
 	echo "  --proxy-http: specifies \${http_proxy}."
@@ -96,7 +98,7 @@ 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} [-a|--architecture ARCHITECTURE] [-b|--bootappend KERNEL_PARAMETER|\"KERNEL_PARAMETERS\"] [--config FILE] [-c|--chroot DIRECTORY] [-d|--distribution DISTRIBUTION] [--disable-generic-indices] [--enable-generic-indices] [--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] [--packages PACKAGE|\"PACKAGES\"] [-p|--package-list 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]"
 	echo "Usage: ${PROGRAM} [-h|--help]"
 	echo "Usage: ${PROGRAM} [-u|--usage]"
 	echo "Usage: ${PROGRAM} [-v|--version]"
@@ -153,7 +155,7 @@ Configuration ()
 
 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 -- ${@}`"
+	ARGUMENTS="`getopt --longoptions root:,type:,architecture:,bootappend:,config:,chroot:,distribution:,filesystem:,flavour:,hook:,include-chroot:,include-image:,kernel:,mirror:,mirror-security:,output:,packages:,package-list:,proxy-ftp:,proxy-http:,section:,server-address:,server-path:,templates:,with-generic-indices,without-generic-indices,with-source,without-source,help,usage,version --name=${PROGRAM} --options r:t:a:b:c:d:f:k:m:o:p:s:huv --shell sh -- ${@}`"
 
 	if [ "${?}" != "0" ]
 	then
@@ -192,12 +194,25 @@ Main ()
 
 			-d|--distribution)
 				case "${2}" in
-					testing)
-						LIVE_DISTRIBUTION="${CODENAME_TESTING}"
+					"${CODENAME_OLDSTABLE}")
+						LIVE_DISTRIBUTION="oldstable"
 						;;
 
-					unstable)
-						LIVE_DISTRIBUTION="${CODENAME_UNSTABLE}"
+					"${CODENAME_STABLE}")
+						LIVE_DISTRIBUTION="stable"
+						;;
+
+					"${CODENAME_TESTING}")
+						LIVE_DISTRIBUTION="testing"
+						;;
+
+					"${CODENAME_UNSTABLE}")
+						LIVE_DISTRIBUTION="unstable"
+						;;
+
+					experimental)
+						LIVE_DISTRIBUTION="unstable"
+						LIVE_DISTRIBUTION_EXPERIMENTAL="yes"
 						;;
 
 					*)
@@ -239,11 +254,15 @@ Main ()
 				LIVE_MIRROR_SECURITY="${2}"; shift 2
 				;;
 
-			-p|--packages)
+			-o|--output)
+				LIVE_IMAGE="${2}"; shift 2
+				;;
+
+			--packages)
 				LIVE_PACKAGES="${2}"; shift 2
 				;;
 
-			--package-list)
+			-p|--package-list)
 				LIVE_PACKAGE_LIST="${2}"; shift 2
 				;;
 
@@ -271,6 +290,22 @@ Main ()
 				LIVE_TEMPLATES="${2}"; shift 2
 				;;
 
+			--with-generic-indices)
+				LIVE_GENERIC_INDICES="yes"; shift
+				;;
+
+			--without-generic-indices)
+				LIVE_GENERIC_INDICES="no"; shift
+				;;
+
+			--with-source)
+				LIVE_SOURCE="yes"; shift
+				;;
+
+			--without-source)
+				LIVE_SOURCE="no"; shift
+				;;
+
 			-h|--help)
 				Help; shift
 				;;
@@ -294,22 +329,21 @@ Main ()
 		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
 
+	# Distribution
+	if [ "${1}" = "dist" ]
+	then
+		for FLAVOUR in minimal standard gnome kde xfce
+		do
+			( make-live -d testing -o "debian-live-${CODENAME_TESTING}-`dpkg --print-architecture`-${FLAVOUR}-" -p ${FLAVOUR} --with-source && cd "${LIVE_ROOT}" && cd .. && mv "${LIVE_ROOT}"/*.iso ./ && rm -rf "${LIVE_ROOT}" ) || rm -rf "${LIVE_ROOT}"
+			( make-live -d unstable -o "debian-live-${CODENAME_TESTING}-`dpkg --print-architecture`-${FLAVOUR}-" -p ${FLAVOUR} --with-source && cd "${LIVE_ROOT}" && cd .. && mv "${LIVE_ROOT}"/*.iso ./ && rm -rf "${LIVE_ROOT}" ) || rm -rf "${LIVE_ROOT}"
+		done
+	fi
+
 	# Building live system
 	Bootstrap
 	Chroot
diff --git a/src/scripts/02defaults.sh b/src/scripts/02defaults.sh
index 99a8d3b..78831e7 100644
--- a/src/scripts/02defaults.sh
+++ b/src/scripts/02defaults.sh
@@ -40,7 +40,7 @@ Defaults ()
 	# Set bootstrap architecture
 	if [ -z "${LIVE_ARCHITECTURE}" ]
 	then
-		LIVE_ARCHITECTURE="`dpkg-architecture -qDEB_BUILD_ARCH`"
+		LIVE_ARCHITECTURE="`dpkg --print-architecture`"
 	fi
 
 	# Set chroot directory
@@ -52,7 +52,7 @@ Defaults ()
 	# Set debian distribution
 	if [ -z "${LIVE_DISTRIBUTION}" ]
 	then
-		LIVE_DISTRIBUTION="${CODENAME_UNSTABLE}"
+		LIVE_DISTRIBUTION="unstable"
 	fi
 
 	# Set bootstrap flavour
@@ -79,7 +79,7 @@ Defaults ()
 				;;
 
 			amd64)
-				if [ "${LIVE_DISTRIBUTION}" = "${CODENAME_UNSTABLE}" ]
+				if [ "${LIVE_DISTRIBUTION}" = "unstable" ]
 				then
 					LIVE_KERNEL="amd64"
 				else
@@ -97,7 +97,7 @@ Defaults ()
 				;;
 
 			i386)
-				if [ "${LIVE_DISTRIBUTION}" = "${CODENAME_STABLE}" ] || [ "${LIVE_DISTRIBUTION}" = "${CODENAME_OLDSTABLE}" ]
+				if [ "${LIVE_DISTRIBUTION}" = "oldstable" ] || [ "${LIVE_DISTRIBUTION}" = "stable" ]
 				then
 					LIVE_KERNEL="386"
 				else
@@ -145,6 +145,24 @@ Defaults ()
 		LIVE_MIRROR_SECURITY="http://security.debian.org/"
 	fi
 
+	# Check for package lists
+	if [ -z "${LIVE_PACKAGE_LIST}" ]
+	then
+		LIVE_PACKAGE_LIST="${BASE}/lists/standard"
+	else
+		if [ "${LIVE_FLAVOUR}" = "minimal" ]
+		then
+			LIVE_PACKAGE_LIST="${BASE}/lists/minimal"
+		fi
+
+		if [ -r "${BASE}/lists/${LIVE_PACKAGE_LIST}" ]
+		then
+			LIVE_PACKAGE_LIST="${BASE}/lists/${LIVE_PACKAGE_LIST}"
+		else
+			LIVE_PACKAGE_LIST="${BASE}/lists/standard"
+		fi
+	fi
+
 	# Set debian sections
 	if [ -z "${LIVE_SECTION}" ]
 	then
@@ -168,4 +186,16 @@ Defaults ()
 	then
 		LIVE_TEMPLATES="${BASE}/templates"
 	fi
+
+	# Set package indices
+	if [ -z "${LIVE_GENERIC_INDICES}" ]
+	then
+		LIVE_GENERIC_INDICES="yes"
+	fi
+
+	# Set source image
+	if [ -z "${LIVE_SOURCE}" ]
+	then
+		LIVE_SOURCE="no"
+	fi
 }
diff --git a/src/scripts/13hack.sh b/src/scripts/13hack.sh
index 74bb5ad..3468c57 100644
--- a/src/scripts/13hack.sh
+++ b/src/scripts/13hack.sh
@@ -11,7 +11,7 @@
 
 Hack_xorg ()
 {
-	if [ -f "${LIVE_CHROOT}/etc/X11/xorg.conf" ]
+	if [ -f "${LIVE_CHROOT}/etc/X11/xorg.conf" ] #&& [ "${LIVE_DISTRIBUTION_EXPERIMENTAL}" != "yes" ]
 	then
 		# Comment "BusID" line and set driver to "vesa"
 		sed -i -e 's/\(^.*BusID.*\)/#\1/g' -e '/Section "Device"/,/EndSection/ s/\(.*Driver.*"\).*\(".*\)/\1vesa\2/g' "${LIVE_CHROOT}"/etc/X11/xorg.conf
diff --git a/src/scripts/14chroot.sh b/src/scripts/14chroot.sh
index 5f3ff9c..55ffa9a 100644
--- a/src/scripts/14chroot.sh
+++ b/src/scripts/14chroot.sh
@@ -21,7 +21,7 @@ Chroot ()
 	then
 		# Configure chroot
 		Patch_chroot apply
-		#Patch_runlevel apply
+		Patch_runlevel apply
 
 		# Configure network
 		Patch_network apply
@@ -30,7 +30,7 @@ Chroot ()
 		Indices custom
 
 		# Install secure apt
-		if [ "${LIVE_DISTRIBUTION}" = "${CODENAME_TESTING}" ] || [ "${LIVE_DISTRIBUTION}" = "${CODENAME_UNSTABLE}" ]
+		if [ "${LIVE_DISTRIBUTION}" = "testing" ] || [ "${LIVE_DISTRIBUTION}" = "unstable" ]
 		then
 			Chroot_exec "apt-get install --yes --force-yes debian-archive-keyring"
 		fi
@@ -44,16 +44,15 @@ Chroot ()
 		# 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}`"
+			grep -v "^#" "${LIVE_PACKAGE_LIST}" > "${LIVE_CHROOT}"/root/"`basename ${LIVE_PACKAGE_LIST}`"
+			Chroot_exec "xargs --arg-file=/root/`basename ${LIVE_PACKAGE_LIST}` apt-get install --yes"
+			rm -f "${LIVE_CHROOT}"/root/"`basename ${LIVE_PACKAGE_LIST}`"
 		fi
 
 		# Install extra packages
@@ -93,12 +92,10 @@ Chroot ()
 		Patch_network deapply
 
 		# Deconfigure chroot
-		#Patch_runlevel deapply
+		Patch_runlevel deapply
 		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
index 0f483a6..10c56e2 100644
--- a/src/scripts/21image.sh
+++ b/src/scripts/21image.sh
@@ -12,42 +12,86 @@
 Indices ()
 {
 	case "${1}" in
-		default)
-			# Configure default sources.list
-			echo "deb http://ftp.debian.org/debian/ ${LIVE_DISTRIBUTION} ${LIVE_SECTION}" > "${LIVE_CHROOT}"/etc/apt/sources.list
-
+		custom)
+			# Configure custom sources.list
 			case "${LIVE_DISTRIBUTION}" in
-				"${CODENAME_TESTING}")
-					echo "deb http://ftp.debian.org/debian/ ${CODENAME_TESTING}-proposed-updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
-					echo "deb http://security.debian.org/ ${CODENAME_TESTING}/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+				oldstable)
+					echo "deb ${LIVE_MIRROR} oldstable ${LIVE_SECTION}" > "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb-src ${LIVE_MIRROR} oldstable ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb ${LIVE_MIRROR_SECURITY} oldstable/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb-src ${LIVE_MIRROR_SECURITY} oldstable/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
+				stable)
+					echo "deb ${LIVE_MIRROR} stable ${LIVE_SECTION}" > "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb-src ${LIVE_MIRROR} stable ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb ${LIVE_MIRROR_SECURITY} stable/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb-src ${LIVE_MIRROR_SECURITY} 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
+				testing)
+					echo "deb ${LIVE_MIRROR} testing ${LIVE_SECTION}" > "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb-src ${LIVE_MIRROR} testing ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb ${LIVE_MIRROR} testing-proposed-updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb-src ${LIVE_MIRROR} testing-proposed-updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb ${LIVE_MIRROR_SECURITY} testing/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb-src ${LIVE_MIRROR_SECURITY} testing/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+					;;
+
+				unstable)
+					echo "deb ${LIVE_MIRROR} unstable ${LIVE_SECTION}" > "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb-src ${LIVE_MIRROR} unstable ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+
+					if [ "${LIVE_DISTRIBUTION_EXPERIMENTAL}" = "yes" ]
+					then
+						echo "deb ${LIVE_MIRROR} experimental ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+						echo "deb-src ${LIVE_MIRROR} experimental ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+
+cat > "${LIVE_CHROOT}"/etc/apt/preferences << EOF
+Package: *
+Pin: release a=experimental
+Pin-Priority: 999
+EOF
+					fi
 					;;
 			esac
 			;;
 
-		custom)
-			# Configure custom sources.list
-			echo "deb ${LIVE_MIRROR} ${LIVE_DISTRIBUTION} ${LIVE_SECTION}" > "${LIVE_CHROOT}"/etc/apt/sources.list
-
+		default)
+			# Configure default 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
+				oldstable)
+					echo "deb http://ftp.debian.org/debian/ oldstable ${LIVE_SECTION}" > "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb-src http://ftp.debian.org/debian/ oldstable ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb http://security.debian.org/ oldstable/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb-src http://security.debian.org/ oldstable/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
+				stable)
+					echo "deb http://ftp.debian.org/debian/ stable ${LIVE_SECTION}" > "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb-src http://ftp.debian.org/debian/ stable ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb http://security.debian.org/ stable/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb-src http://security.debian.org/ 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
+				testing)
+					echo "deb http://ftp.debian.org/debian/ testing ${LIVE_SECTION}" > "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb-src http://ftp.debian.org/debian/ testing ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb http://ftp.debian.org/debian/ testing-proposed-updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb-src http://ftp.debian.org/debian/ testing-proposed-updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb http://security.debian.org/ testing/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb-src http://security.debian.org/ testing/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+					;;
+
+				unstable)
+					echo "deb http://ftp.debian.org/debian/ unstable ${LIVE_SECTION}" > "${LIVE_CHROOT}"/etc/apt/sources.list
+					echo "deb-src http://ftp.debian.org/debian/ unstable ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+
+					if [ "${LIVE_DISTRIBUTION_EXPERIMENTAL}" = "yes" ]
+					then
+						echo "deb http://ftp.debian.org/debian/ experimental ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+						echo "deb-src http://ftp.debian.org/debian/ experimental ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list
+					fi
 					;;
 			esac
 			;;
@@ -55,79 +99,13 @@ Indices ()
 
 	# Update indices
 	Chroot_exec "apt-get update"
-}
 
-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" ]
+	if [ "${LIVE_DISTRIBUTION_EXPERIMENTAL}" = "yes" ]
 	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
+		# experimental is sometimes broken,
+		# therefore this is intentionally kept interactive.
+		Chroot_exec "apt-get upgrade" || return 0
+		Chroot_exec "apt-get dist-upgrade" || return 0
 	fi
 }
 
@@ -138,22 +116,22 @@ Genrootfs ()
 			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
+			genext2fs --size-in-blocks=${REAL_DIM} --reserved-blocks=0 --root="${LIVE_CHROOT}" "${LIVE_ROOT}"/binary/casper/filesystem.ext2
 			;;
 
 		plain)
 			cd "${LIVE_CHROOT}"
-			find . | cpio -pumd "${LIVE_ROOT}"/image/casper/filesystem.dir
+			find . | cpio -pumd "${LIVE_ROOT}"/binary/casper/filesystem.dir
 			cd "${OLDPWD}"
 			;;
 
 		squashfs)
-			if [ -f "${LIVE_ROOT}"/image/casper/filesystem.squashfs ]
+			if [ -f "${LIVE_ROOT}"/binary/casper/filesystem.squashfs ]
 			then
-				rm "${LIVE_ROOT}"/image/casper/filesystem.squashfs
+				rm "${LIVE_ROOT}"/binary/casper/filesystem.squashfs
 			fi
 
-			mksquashfs "${LIVE_CHROOT}" "${LIVE_ROOT}"/image/casper/filesystem.squashfs
+			mksquashfs "${LIVE_CHROOT}" "${LIVE_ROOT}"/binary/casper/filesystem.squashfs
 			;;
 	esac
 }
@@ -169,18 +147,18 @@ 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
+				mkdir -p "${LIVE_ROOT}"/binary/isolinux
+				cp "${LIVE_CHROOT}"/usr/lib/syslinux/isolinux.bin "${LIVE_ROOT}"/binary/isolinux
 
 				# Install syslinux templates
 				cp -r "${LIVE_TEMPLATES}"/syslinux/* \
-					"${LIVE_ROOT}"/image/isolinux
-				rm -f "${LIVE_ROOT}"/image/isolinux/pxelinux.cfg
+					"${LIVE_ROOT}"/binary/isolinux
+				rm -f "${LIVE_ROOT}"/binary/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
+				sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" "${LIVE_ROOT}"/binary/isolinux/isolinux.cfg
+				sed -i -e "s/LIVE_DATE/`date +%Y%m%d`/" "${LIVE_ROOT}"/binary/isolinux/f1.txt
+				sed -i -e "s/LIVE_VERSION/${VERSION}/" "${LIVE_ROOT}"/binary/isolinux/f10.txt
 				;;
 
 			net)
@@ -207,3 +185,114 @@ Syslinux ()
 		Patch_network deapply
 	fi
 }
+
+Linuximage ()
+{
+	case "${1}" in
+		iso)
+			# Copy linux-image
+			cp "${LIVE_CHROOT}"/boot/vmlinuz-* "${LIVE_ROOT}"/binary/isolinux/vmlinuz
+			cp "${LIVE_CHROOT}"/boot/initrd.img-* "${LIVE_ROOT}"/binary/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}"/binary/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
+}
+
+Md5sum ()
+{
+	# Calculating md5sums
+	cd "${LIVE_ROOT}"/binary
+	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}"/binary
+}
+
+Mkisofs ()
+{
+	case "${1}" in
+		binary)
+			if [ "${LIVE_ARCHITECTURE}" = "amd64" ] || [ "${LIVE_ARCHITECTURE}" = "i386" ]
+			then
+				# Create image
+				mkisofs -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o "${LIVE_ROOT}"/"${LIVE_IMAGE}"binary.iso -r -J -l -V "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}"/binary ${LIVE_INCLUDE_IMAGE}
+			else
+				echo "W: Bootloader on your architecture not yet supported (Continuing in 5 seconds)."
+				sleep 5
+
+				# Create image
+				mkisofs -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o "${LIVE_ROOT}"/"${LIVE_IMAGE}"binary.iso -r -J -l -V "Debian Live `date +%Y%m%d`" "${LIVE_ROOT}"/binary ${LIVE_INCLUDE_IMAGE}
+			fi
+			;;
+
+		source)
+			# Create image
+			mkisofs -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o "${LIVE_ROOT}"/"${LIVE_IMAGE}"source.iso -r -J -l -V "Debian Live `date +%Y%m%d`" "${LIVE_ROOT}"/source
+			;;
+	esac
+}
+
+Sources ()
+{
+	# Download sources
+	Chroot_exec "dpkg --get-selections" | awk '{ print $1 }' > "${LIVE_CHROOT}"/root/dpkg-selection.txt
+	Chroot_exec "xargs --arg-file=/root/dpkg-selection.txt apt-get source --download-only"
+	rm -f "${LIVE_CHROOT}"/root/dpkg-selection.txt
+
+	# Sort sources
+	for DSC in "${LIVE_CHROOT}"/*.dsc
+	do
+		SOURCE="`awk '/Source:/ { print $2; }' ${DSC}`"
+
+		if [ "`echo ${SOURCE} | cut -b 1-3`" == "lib" ]
+		then
+			LETTER="`echo ${SOURCE} | cut -b 1-4`"
+		else
+			LETTER="`echo ${SOURCE} | cut -b 1`"
+		fi
+
+		# Install directory
+		install -d -m 0755 "${LIVE_ROOT}"/source/"${LETTER}"/"${SOURCE}"
+
+		# Move sources
+		mv "${LIVE_CHROOT}"/"${SOURCE}"_* "${LIVE_ROOT}"/source/"${LETTER}"/"${SOURCE}"
+	done
+}
diff --git a/src/scripts/22iso.sh b/src/scripts/22iso.sh
index 8f5b8c2..07b1f91 100644
--- a/src/scripts/22iso.sh
+++ b/src/scripts/22iso.sh
@@ -11,32 +11,59 @@
 
 Iso ()
 {
-	mkdir -p "${LIVE_ROOT}"/image/casper
+	if [ ! -f "${LIVE_ROOT}"/.stage/image_binary ]
+	then
+		mkdir -p "${LIVE_ROOT}"/binary/casper
 
-	# Switching package indices to default
-	Indices default
+		# Switching package indices to default
+		if [ "${LIVE_GENERIC_INDICES}" = "yes" ]
+		then
+			Indices default
+		fi
 	
-	# Generating rootfs image
-	Genrootfs
+		# Generating rootfs image
+		Genrootfs
 
-	# Switching package indices to custom
-	Indices custom
+		# Switching package indices to custom
+		if [ "${LIVE_GENERIC_INDICES}" = "yes" ]
+		then
+			Indices custom
+		fi
 
-	# Installing syslinux
-	Syslinux iso
+		# Installing syslinux
+		Syslinux iso
 
-	# Installing linux-image
-	Linuximage iso
+		# Installing linux-image
+		Linuximage iso
 
-	# Installing memtest
-	Memtest iso
+		# Installing memtest
+		Memtest iso
 
-	# Installing templates
-	cp -r "${LIVE_TEMPLATES}"/iso/* "${LIVE_ROOT}"/image
+		# Installing templates
+		if [ "${LIVE_FLAVOUR}" != "minimal" ]
+		then
+			cp -r "${LIVE_TEMPLATES}"/iso/* "${LIVE_ROOT}"/binary
+		fi
 
-	# Calculating md5sums
-	Md5sum
+		# Calculating md5sums
+		Md5sum
 
-	# Creating image
-	Mkisofs
+		# Creating image
+		Mkisofs binary
+
+		# Touching stage file
+		touch "${LIVE_ROOT}"/.stage/image_binary
+	fi
+
+	if [ ! -f "${LIVE_ROOT}"/.stage/image_source ] && [ "${LIVE_SOURCE}" = "yes" ]
+	then
+		# Downloading sources
+		Sources
+
+		# Creating image
+		Mkisofs source
+
+		# Touching stage file
+		touch "${LIVE_ROOT}"/.stage/image_source
+	fi
 }
diff --git a/src/scripts/23net.sh b/src/scripts/23net.sh
index 1441183..563420b 100644
--- a/src/scripts/23net.sh
+++ b/src/scripts/23net.sh
@@ -11,51 +11,73 @@
 
 Net ()
 {
-	# Installing smbfs
-	Chroot_exec "apt-get install --yes smbfs"
-
-	if [ "${LIVE_ARCHITECTURE}" = "amd64" ] || [ "${LIVE_ARCHITECTURE}" = "i386" ]
+	if [ ! -f "${LIVE_ROOT}"/.stage/image_binary ]
 	then
-		if [ ! -d "${LIVE_CHROOT}"/etc/initramfs-tools ]
-		then 
-			mkdir "${LIVE_CHROOT}"/etc/initramfs-tools
-		fi
+		# 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
+			# 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
+			Chroot_exec "update-initramfs -tu"
+		fi
 
-	# Switching package indices to default
-	Indices default
+		# Switching package indices to default
+		if [ "${LIVE_GENERIC_INDICES}" = "yes" ]
+		then
+			Indices default
+		fi
 	
-	# Generating rootfs image
-	Genrootfs
-
-	# Switching package indices to custom
-	Indices custom
-
-	# 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
+		# Generating rootfs image
+		Genrootfs
+
+		# Switching package indices to custom
+		if [ "${LIVE_GENERIC_INDICES}" = "yes" ]
+		then
+			Indices custom
+		fi
+
+		# Installing syslinux
+		Syslinux net
+
+		# Installing linux-image
+		Linuximage net
+
+		# Installing memtest
+		Memtest net
+
+		# Creating tarball
+		cd "${LIVE_ROOT}" && \
+		mv binary "`basename ${LIVE_SERVER_PATH}`" && \
+		cd .. && \
+		tar cfz binary.tar.gz "`basename ${LIVE_ROOT}`/`basename ${LIVE_SERVER_PATH}`" "`basename ${LIVE_ROOT}`/tftpboot" && \
+		mv binary.tar.gz "${LIVE_ROOT}" && \
+		cd "${OLDPWD}" && \
+		mv "`basename ${LIVE_SERVER_PATH}`" binary
+
+		# Touching stage file
+		touch "${LIVE_ROOT}"/.stage/image_binary
+	fi
+
+	if [ ! -f "${LIVE_ROOT}"/.stage/image_source ] && [ "${LIVE_SOURCE}" = "yes" ]
+	then
+		# Downloading sources
+		Sources
+
+		# Creating tarball
+		tar cfz source.tar.gz "${LIVE_ROOT}"/source
+
+		# Touching stage file
+		touch "${LIVE_ROOT}"/.stage/image_source
+	fi
 }
-- 
cgit v1.0