summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/auto/build3
-rwxr-xr-xexamples/auto/clean5
-rwxr-xr-xexamples/auto/config5
-rwxr-xr-xexamples/cron/cron.daily155
-rw-r--r--examples/cron/default16
-rwxr-xr-xexamples/cron/images.sh192
-rwxr-xr-xexamples/hooks/all_binary_debian-installer-banner.sh2
-rwxr-xr-xexamples/hooks/all_chroot_losetup-lukshome.sh37
-rwxr-xr-xexamples/hooks/lenny_binary_live-installer-usbfix.sh96
-rwxr-xr-xexamples/hooks/lenny_chroot_aufs-modules.sh23
-rwxr-xr-xexamples/hooks/lenny_chroot_kpdf-nodrm.sh17
-rwxr-xr-xexamples/hooks/lenny_chroot_madwifi-modules.sh26
-rwxr-xr-xexamples/hooks/lenny_chroot_nvidia-legacy-modules.sh56
-rwxr-xr-xexamples/hooks/lenny_chroot_squashfs-modules.sh23
-rwxr-xr-xexamples/hooks/lenny_chroot_sun-java5.sh28
15 files changed, 380 insertions, 304 deletions
diff --git a/examples/auto/build b/examples/auto/build
deleted file mode 100755
index 34956c13d..000000000
--- a/examples/auto/build
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-lb build noauto "${@}" 2>&1 | tee binary.log
diff --git a/examples/auto/clean b/examples/auto/clean
deleted file mode 100755
index 436f52d9d..000000000
--- a/examples/auto/clean
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-lb clean noauto "${@}"
-rm -f config/binary config/bootstrap config/chroot config/common config/source
-rm -f binary.log
diff --git a/examples/auto/config b/examples/auto/config
deleted file mode 100755
index e67a471c7..000000000
--- a/examples/auto/config
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-lb config noauto \
- --packages-lists "standard" \
- "${@}"
diff --git a/examples/cron/cron.daily b/examples/cron/cron.daily
new file mode 100755
index 000000000..561075687
--- /dev/null
+++ b/examples/cron/cron.daily
@@ -0,0 +1,155 @@
+#!/bin/sh
+
+set -e
+
+BUILD="daily"
+HOST="$(hostname)"
+
+# Checking for live-build availability
+if [ ! -x /usr/bin/lb ]
+then
+ exit 0
+fi
+
+# Checking for live-build defaults
+if [ -r /etc/default/live-build_autobuild ]
+then
+ . /etc/default/live-build_autobuild
+else
+ echo "E: /etc/default/live-build_autobuild missing."
+ exit 1
+fi
+
+# Checking for autobuild
+if [ "${AUTOBUILD}" != "true" ]
+then
+ exit 0
+fi
+
+# Checking for build directory
+if [ ! -d "${TEMPDIR}" ]
+then
+ mkdir -p "${TEMPDIR}"/debian-live
+else
+ # FIXME: maybe we should just remove the left overs.
+ echo "E: ${TEMPDIR} needs cleanup."
+ exit 1
+fi
+
+echo "$(date +%b\ %d\ %H:%M:%S) ${HOST} live-build: begin daily build." >> /var/log/live
+
+for ARCHITECTURE in ${ARCHITECTURES}
+do
+ for DISTRIBUTION in ${DISTRIBUTIONS}
+ do
+ for PACKAGES_LIST in ${PACKAGES_LISTS}
+ do
+ if [ ! -f "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-log.txt ]
+ then
+ # Creating build directory
+ mkdir -p "${TEMPDIR}"/debian-live
+
+ cd "${TEMPDIR}"/debian-live
+ echo "Begin: $(date -R)" > "${TEMPDIR}"/debian-live/log.txt
+
+ # Generating images
+ lh_config -b iso -s tar --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-bootstrap ${MIRROR_BOOTSTRAP} --mirror-binary ${MIRROR_BINARY} --mirror-binary-security ${MIRROR_BINARY_SECURITY} --source true ${OPTIONS}
+ lh_build >> "${TEMPDIR}"/debian-live/log.txt 2>&1
+
+ echo "End: $(date -R)" >> "${TEMPDIR}"/debian-live/log.txt
+ fi
+
+ if [ -f "${TEMPDIR}"/debian-live/binary.iso ] && [ -f "${TEMPDIR}"/debian-live/source.tar ]
+ then
+ # Creating log directory
+ mkdir -p "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log
+
+ # Moving logs
+ mv "${TEMPDIR}"/debian-live/log.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-log.txt
+ mv "${TEMPDIR}"/debian-live/packages.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-packages.txt
+
+ # Creating images directory
+ mkdir -p "${DESTDIR}"/"${BUILD}"-builds/${DATE}/${ARCHITECTURE}
+ mkdir -p "${DESTDIR}"/"${BUILD}"-builds/${DATE}/source
+
+ # Moving images
+ mv "${TEMPDIR}"/debian-live/binary.iso "${DESTDIR}"/"${BUILD}"-builds/${DATE}/${ARCHITECTURE}/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}.iso
+ mv "${TEMPDIR}"/debian-live/source.tar "${DESTDIR}"/"${BUILD}"-builds/${DATE}/source/debian-live-${DISTRIBUTION}-source-${PACKAGES_LIST}.tar
+ fi
+
+ if [ ! -f "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-usb-hdd-log.txt ]
+ then
+ # Workaround of missing multi-binary support in live-build
+ mv "${TEMPDIR}"/debian-live/binary/casper "${TEMPDIR}"/debian-live/casper.tmp
+ rm -rf "${TEMPDIR}"/debian-live/binary* "${TEMPDIR}"/debian-live/.stage/binary_*
+ mkdir "${TEMPDIR}"/debian-live/binary
+ mv "${TEMPDIR}"/debian-live/casper.tmp "${TEMPDIR}"/debian-live/binary/casper
+ touch "${TEMPDIR}"/debian-live/.stage/binary_chroot
+ touch "${TEMPDIR}"/debian-live/.stage/binary_rootfs
+
+ # Creating build directory
+ mkdir -p "${TEMPDIR}"/debian-live
+
+ cd "${TEMPDIR}"/debian-live
+ echo "Begin: $(date -R)" > "${TEMPDIR}"/debian-live/log.txt
+
+ # Generating images
+ lh_config -b usb-hdd -s tar --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-bootstrap ${MIRROR_BOOTSTRAP} --mirror-binary ${MIRROR_BINARY} --mirror-binary-security ${MIRROR_BINARY_SECURITY} --source false ${OPTIONS}
+ lh_build >> "${TEMPDIR}"/debian-live/log.txt 2>&1
+
+ echo "End: $(date -R)" >> "${TEMPDIR}"/debian-live/log.txt
+ fi
+
+ if [ -f "${TEMPDIR}"/debian-live/binary.img ]
+ then
+ # Creating log directory
+ mkdir -p "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log
+
+ # Moving logs
+ mv "${TEMPDIR}"/debian-live/log.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-usb-hdd-log.txt
+ cp "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-packages.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-usb-hdd-packages.txt
+
+ # Creating image directory
+ mkdir -p "${DESTDIR}"/"${BUILD}"-builds/${DATE}/${ARCHITECTURE}
+
+ # Moving images
+ mv "${TEMPDIR}"/debian-live/binary.img "${DESTDIR}"/"${BUILD}"-builds/${DATE}/${ARCHITECTURE}/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}.img
+ fi
+
+ # Cleanup
+ cd "${TEMPDIR}"/debian-live
+ lh_clean
+ done
+
+ # Cleanup
+ cd "${TEMPDIR}"/debian-live
+ lh_clean purge
+ done
+done
+
+# Cleaning up
+if [ -f "${TEMPDIR}"/debian-live/chroot/proc/version ]
+then
+ umount "${TEMPDIR}"/debian-live/chroot/proc
+fi
+
+if [ -d "${TEMPDIR}"/debian-live/chroot/sys/kernel ]
+then
+ umount "${TEMPDIR}"/debian-live/chroot/sys
+fi
+
+# Removing build directory
+rm -rf "${TEMPDIR}"
+
+# Creating md5sums
+for DIRECTORY in "${DESTDIR}"/"${BUILD}"-builds/${DATE}/*
+do
+ cd "${DIRECTORY}"
+ md5sum * > MD5SUMS
+done
+
+# Creating current symlink
+rm -f "${DESTDIR}"/"${BUILD}"-builds/current
+ln -s ${DATE} "${DESTDIR}"/"${BUILD}"-builds/current
+
+echo "$(date +%b\ %d\ %H:%M:%S) ${HOST} live-build: end daily build." >> /var/log/live
diff --git a/examples/cron/default b/examples/cron/default
new file mode 100644
index 000000000..1778b5e89
--- /dev/null
+++ b/examples/cron/default
@@ -0,0 +1,16 @@
+# Defaults for /etc/cron.daily/live-build_autobuild
+
+AUTOBUILD="false"
+
+DATE="$(date +%Y%m%d)"
+DESTDIR="/srv/debian-live"
+TEMPDIR="/srv/tmp/live-build"
+
+OPTIONS="--binary-indices false"
+
+ARCHITECTURES="$(dpkg --print-architecture)"
+DISTRIBUTIONS="sid"
+MIRROR_BOOTSTRAP="http://ftp.debian.org/debian/"
+MIRROR_BINARY="http://ftp.debian.org/debian/"
+MIRROR_BINARY_SECURITY="http://security.debian.org/"
+PACKAGES_LISTS="standard rescue gnome-desktop kde-desktop xfce-desktop"
diff --git a/examples/cron/images.sh b/examples/cron/images.sh
new file mode 100755
index 000000000..a6aebd95d
--- /dev/null
+++ b/examples/cron/images.sh
@@ -0,0 +1,192 @@
+#!/bin/sh
+
+set -e
+
+# Static variables
+DISTRIBUTIONS="${DISTRIBUTIONS:-lenny squeeze sid}"
+FLAVOURS="${FLAVOURS:-standard rescue gnome-desktop kde-desktop lxde-desktop xfce-desktop}"
+SOURCE="${SOURCE:-true}"
+
+MIRROR="${MIRROR:-http://cdn.debian.net/debian/}"
+MIRROR_SECURITY="${MIRROR_SECURITY:-http://security.debian.org/}"
+
+# Dynamic variables
+ARCHITECTURE="$(dpkg --print-architecture)"
+DATE="$(date +%Y%m%d)"
+
+Set_defaults ()
+{
+ # Distribution defaults
+ APT_RECOMMENDS="true"
+ BINARY_INDICES="true"
+ DEBIAN_INSTALLER="live"
+ DEBIAN_INSTALLER_GUI="true"
+ PACKAGES="--packages live-installer-launcher"
+ TASKSEL="tasksel"
+
+ # Distribution specific options (ugly!)
+ case "${DISTRIBUTION}" in
+ lenny)
+ APT_RECOMMENDS="false"
+ BINARY_INDICES="true"
+ DEBIAN_INSTALLER="false"
+ PACKAGES=""
+ TASKSEL="aptitude"
+
+ case "${ARCHITECTURE}" in
+ amd64)
+ case "${FLAVOUR}" in
+ gnome-desktop)
+ BINARY_INDICES="false"
+
+ mkdir -p config/chroot_local-hooks
+ cd config/chroot_local-hooks
+ echo "apt-get remove --yes --purge openoffice.org-help-en-us" > package-removals
+ echo "apt-get remove --yes --purge epiphany-browser epiphany-browser-data epiphany-extensions epiphany-gecko" >> package-removals
+ echo "apt-get remove --yes --purge gnome-user-guide" >> package-removals
+ cd -
+ ;;
+
+ kde-desktop)
+ BINARY_INDICES="false"
+ ;;
+ esac
+ ;;
+
+ i386)
+ case "${FLAVOUR}" in
+ gnome-desktop|kde-desktop)
+ BINARY_INDICES="false"
+ KERNEL="-k 686"
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ squeeze)
+ DEBIAN_INSTALLER_DISTRIBUTION="daily"
+ DEBIAN_INSTALLER_GUI="false"
+
+ LIVE_INSTALLER="20"
+ LIVE_BOOT="2.0~a15-1"
+ LIVE_CONFIG="2.0~a15-1"
+
+ mkdir -p config/binary_local-udebs
+ cd config/binary_local-udebs
+ wget -c http://live.debian.net/archive/packages/live-installer/${LIVE_INSTALLER}/live-installer_${LIVE_INSTALLER}.dsc
+ wget -c http://live.debian.net/archive/packages/live-installer/${LIVE_INSTALLER}/live-installer_${LIVE_INSTALLER}.tar.gz
+ wget -c http://live.debian.net/archive/packages/live-installer/${LIVE_INSTALLER}/live-installer_${LIVE_INSTALLER}_i386.udeb
+ cd -
+
+ mkdir -p config/chroot_local-packages
+ cd config/chroot_local-packages
+
+ wget -c http://live.debian.net/archive/packages/live-installer/${LIVE_INSTALLER}/live-installer_${LIVE_INSTALLER}.dsc
+ wget -c http://live.debian.net/archive/packages/live-installer/${LIVE_INSTALLER}/live-installer_${LIVE_INSTALLER}.tar.gz
+ wget -c http://live.debian.net/archive/packages/live-installer/${LIVE_INSTALLER}/live-installer-launcher_${LIVE_INSTALLER}_all.deb
+
+ wget -c http://live.debian.net/archive/packages/live-boot/${LIVE_BOOT}/live-boot_${LIVE_BOOT}.dsc
+ wget -c http://live.debian.net/archive/packages/live-boot/${LIVE_BOOT}/live-boot_${LIVE_BOOT}.diff.gz
+ wget -c http://live.debian.net/archive/packages/live-boot/${LIVE_BOOT}/live-boot_$(echo ${LIVE_BOOT} | awk -F- '{ print $1 }').orig.tar.gz
+ wget -c http://live.debian.net/archive/packages/live-boot/${LIVE_BOOT}/live-boot_${LIVE_BOOT}_all.deb
+ wget -c http://live.debian.net/archive/packages/live-boot/${LIVE_BOOT}/live-boot-initramfs-tools_${LIVE_BOOT}_all.deb
+ wget -c http://live.debian.net/archive/packages/live-boot/${LIVE_BOOT}/live-initramfs_${LIVE_BOOT}_all.deb
+
+ wget -c http://live.debian.net/archive/packages/live-config/${LIVE_CONFIG}/live-config_${LIVE_CONFIG}.dsc
+ wget -c http://live.debian.net/archive/packages/live-config/${LIVE_CONFIG}/live-config_${LIVE_CONFIG}.diff.gz
+ wget -c http://live.debian.net/archive/packages/live-config/${LIVE_CONFIG}/live-config_$(echo ${LIVE_CONFIG} | awk -F- '{ print $1 }').orig.tar.gz
+ wget -c http://live.debian.net/archive/packages/live-config/${LIVE_CONFIG}/live-config_${LIVE_CONFIG}_all.deb
+ wget -c http://live.debian.net/archive/packages/live-config/${LIVE_CONFIG}/live-config-sysvinit_${LIVE_CONFIG}_all.deb
+
+ cd -
+ ;;
+ esac
+}
+
+# Build images
+for DISTRIBUTION in ${DISTRIBUTIONS}
+do
+ rm -rf cache/stages*
+
+ for FLAVOUR in ${FLAVOURS}
+ do
+ if [ -e .stage ]
+ then
+ lb clean
+ fi
+
+ if [ -e config ]
+ then
+ rm -f config/* || true
+ rmdir --ignore-fail-on-non-empty config/* || true
+ fi
+
+ rm -rf cache/packages*
+ rm -rf cache/stages_rootfs
+
+ Set_defaults
+
+ lb config \
+ --apt-recommends ${APT_RECOMMENDS} \
+ --binary-indices ${BINARY_INDICES} \
+ --cache-stages "bootstrap rootfs" \
+ --debian-installer ${DEBIAN_INSTALLER} \
+ --debian-installer-distribution ${DEBIAN_INSTALLER_DISTRIBUTION} \
+ --debian-installer-gui ${DEBIAN_INSTALLER_GUI} \
+ --distribution ${DISTRIBUTION} \
+ --mirror-bootstrap ${MIRROR} \
+ --mirror-chroot ${MIRROR} \
+ --mirror-chroot-security ${MIRROR_SECURITY} \
+ ${PACKAGES} \
+ --packages-lists ${FLAVOUR} \
+ --tasksel ${TASKSEL} ${KERNEL}
+
+ lb build 2>&1 | tee debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.iso.log
+
+ mv binary*.iso debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.iso
+ mv binary.list debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.iso.list
+ mv binary.packages debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.iso.packages
+
+ if [ "${DISTRIBUTION}" = "lenny" ] && [ "${ARCHITECTURE}" != "powerpc" ]
+ then
+ lb clean --binary
+ lb config -binary-images usb-hdd
+ lb binary 2>&1 | tee debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.img.log
+
+ mv binary.img debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.img
+ mv binary.list debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.img.list
+ mv binary.packages debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.img.packages
+ fi
+
+ if [ "${ARCHITECTURE}" != "powerpc" ]
+ then
+ lb clean
+ rm -rf cache/stages_rootfs
+ lb config --binary-images net
+
+ lb build 2>&1 | tee debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.tar.gz.log
+
+ mv binary-net.tar.gz debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.tar.gz
+ mv binary.list debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.tar.gz.list
+ mv binary.packages debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.tar.gz.packages
+
+ mv binary/*/filesystem.squashfs debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.squashfs
+ for memtest in tftpboot/debian-live/${ARCHITECTURE}/memtest*; do cp -f ${memtest} debian-live-${DISTRIBUTION}-${ARCHITECTURE}.$(basename ${memtest}); done || true
+ for kernel in tftpboot/debian-live/${ARCHITECTURE}/vmlinuz*; do cp -f ${kernel} debian-live-${DISTRIBUTION}-${ARCHITECTURE}.$(basename ${kernel}); done
+ for initrd in tftpboot/debian-live/${ARCHITECTURE}/initrd*; do cp ${initrd} debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.$(basename ${initrd}); done
+ fi
+
+ if [ "${SOURCE}" = "true" ]
+ then
+ lb config --source true
+
+ lb source 2>&1 | tee debian-live-${DISTRIBUTION}-source-${FLAVOUR}.log
+
+ mv source.debian.tar.gz debian-live-${DISTRIBUTION}-source-${FLAVOUR}.debian.tar.gz
+ mv source.debian.list debian-live-${DISTRIBUTION}-source-${FLAVOUR}.debian.tar.gz.list
+ mv source.debian-live.tar.gz debian-live-${DISTRIBUTION}-source-${FLAVOUR}.debian-live.tar.gz
+ mv source.debian-live.list debian-live-${DISTRIBUTION}-source-${FLAVOUR}.debian-live.tar.gz.list
+ fi
+ done
+done
diff --git a/examples/hooks/all_binary_debian-installer-banner.sh b/examples/hooks/all_binary_debian-installer-banner.sh
index 61c160ca6..76c5d0785 100755
--- a/examples/hooks/all_binary_debian-installer-banner.sh
+++ b/examples/hooks/all_binary_debian-installer-banner.sh
@@ -5,7 +5,7 @@
# To enable it, copy or symlink this hook into your config/binary_local-hooks
# directory and add a replacement banner.png at:
#
-# config/binary_debian-installer/banner.png
+# config/binary_local-includes/binary/install/banner.png
#
# The file should be a PNG image of dimensions 800 x 75.
diff --git a/examples/hooks/all_chroot_losetup-lukshome.sh b/examples/hooks/all_chroot_losetup-lukshome.sh
index b6f33bf7f..95d3c053a 100755
--- a/examples/hooks/all_chroot_losetup-lukshome.sh
+++ b/examples/hooks/all_chroot_losetup-lukshome.sh
@@ -333,32 +333,27 @@ do
esac
done
-if [ -x /sbin/blkid ]
-then
- CRYPTHOME=$(/sbin/blkid -L ${LUKSPART})
-else
- # search for a partition labeled "lukshome" or $LUKSPART
- for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram | grep -v fd)
+# search for a partition labeled "lukshome" or $LUKSPART
+for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram | grep -v fd)
+do
+ for dev in $(subdevices "${sysblock}")
do
- for dev in $(subdevices "${sysblock}")
- do
- devname=$(sys2dev "${dev}")
- # find partition name and filesystem type
- if [ "$(/lib/udev/vol_id -l ${devname} 2>/dev/null)" = "${LUKSPART}" ]
- then
- # found one partition with correct label
- CRYPTHOME="${devname}"
- # don't search further
- break
- fi
- done
- # if already found, don't search further
- if [ -n "${CRYPTHOME}" ]
+ devname=$(sys2dev "${dev}")
+ # find partition name and filesystem type
+ if [ "$(/lib/udev/vol_id -l ${devname} 2>/dev/null)" = "${LUKSPART}" ]
then
+ # found one partition with correct label
+ CRYPTHOME="${devname}"
+ # don't search further
break
fi
done
-fi
+ # if already found, don't search further
+ if [ -n "${CRYPTHOME}" ]
+ then
+ break
+ fi
+done
# if no partition found, exit
if [ -z "${CRYPTHOME}" ]
diff --git a/examples/hooks/lenny_binary_live-installer-usbfix.sh b/examples/hooks/lenny_binary_live-installer-usbfix.sh
deleted file mode 100755
index ded8b80ed..000000000
--- a/examples/hooks/lenny_binary_live-installer-usbfix.sh
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/bin/sh
-
-echo "BINARY-HOOK: fix install from USB in Lenny."
-
-# This is a *binary-hook* to allow disk installations from USB for
-# Debian 5.0.x Lenny. Place this file in config/binary_local-hooks/,
-# make it executable and rebuild your live image (binary only).
-
-# This workaround for debian-installer was adapted from Chris Lamb
-original patch:
-# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=498143#5
-
-# It works by fooling apt-setup. With an existing /hd-media directory
-# apt-setup will not try to umount /cdrom. Enable live installer with
-# lh_config:
-#
-# lh_config --debian-installer "live"
-#
-# Rebuild your binary image. No options needed on boot.
-
-cat > cdrom-detect.postinst.patch << 'EOF'
-@@ -44,6 +44,30 @@ do
- fi
- done
-
-+ # Try disk partitions masquerading as Debian CDs for Debian Live
-+ # "usb-hdd" images. Only vfat and ext are supported.
-+ modprobe vfat >/dev/null 2>&1 || true
-+ for device in $(list-devices partition); do
-+ if mount -t vfat -o ro,exec $device /cdrom ||
-+ mount -t ext2 -o ro,exec $device /cdrom; then
-+ log "Pseudo CD-ROM mount succeeded: device=$device"
-+
-+ # Test whether it's a Debian CD
-+ if [ -e /cdrom/.disk/info ]; then
-+ mounted=1
-+ db_set cdrom-detect/cdrom_device $device
-+ # fake hd-media install so that apt-setup doesn't break.
-+ mkdir /hd-media
-+ break
-+ else
-+ log "Ignoring pseudo CD-ROM device $device - it is not a Debian CD"
-+ umount /cdrom 2>/dev/null || true
-+ fi
-+ else
-+ log "Psuedo CD-ROM mount failed: device=$device"
-+ fi
-+ done
-+
- if [ "$mounted" = "1" ]; then
- break
- fi
-
-EOF
-
-# for the syslinux installer
-mkdir usb-install-syslinux
-cd usb-install-syslinux
-zcat ../binary/install/initrd.gz | cpio -iv
-patch ./var/lib/dpkg/info/cdrom-detect.postinst < ../cdrom-detect.postinst.patch
-PATCH_ERROR=${?}
-if [ "${PATCH_ERROR}" != 0 ]
-then
- # if there was an error, say it and undo everything.
- echo "ERROR: error while patching cdrom-detect.postinst."
- cd ..
- rmdir -rf usb-install-syslinux
- exit 0
-fi
-# rebuild the initrd
-find . -print0 | cpio -0 -H newc -ov | gzip -c > ../initrd-new.gz
-cd ..
-mv initrd-new.gz binary/install/initrd.gz
-rm -rf usb-install-syslinux
-
-# for the gtk installer
-mkdir usb-install-gtk
-cd usb-install-gtk
-zcat ../binary/install/gtk/initrd.gz | cpio -iv
-patch ./var/lib/dpkg/info/cdrom-detect.postinst < ../cdrom-detect.postinst.patch
-PATCH_ERROR=${?}
-if [ "${PATCH_ERROR}" != 0 ]
-then
- # if there was an error, say it and undo everything
- echo "ERROR: error while patching cdrom-detect.postinst."
- cd ..
- rmdir -rf usb-install-gtk
- exit 0
-fi
-# rebuild the initrd
-find . -print0 | cpio -0 -H newc -ov | gzip -c > ../initrd-new.gz
-cd ..
-mv initrd-new.gz binary/install/gtk/initrd.gz
-rm -rf usb-install-gtk
-
-rm cdrom-detect.postinst.patch
diff --git a/examples/hooks/lenny_chroot_aufs-modules.sh b/examples/hooks/lenny_chroot_aufs-modules.sh
deleted file mode 100755
index 2d0d16e40..000000000
--- a/examples/hooks/lenny_chroot_aufs-modules.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# This is a hook for live-build(7) to install aufs drivers
-# To enable it, copy or symlink this hook into your config/chroot_local-hooks
-# directory.
-#
-# Note: You only want to use this hook if there is no prebuild aufs-modules-*
-# package available for your kernel flavour.
-
-apt-get install --yes build-essential
-
-# Building kernel module
-which module-assistant || apt-get install --yes module-assistant
-module-assistant update
-
-for KERNEL in /boot/vmlinuz-*
-do
- VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')"
-
- module-assistant --non-inter --quiet auto-install aufs -l ${VERSION}
-done
-
-module-assistant clean aufs
diff --git a/examples/hooks/lenny_chroot_kpdf-nodrm.sh b/examples/hooks/lenny_chroot_kpdf-nodrm.sh
deleted file mode 100755
index 20a4f9f33..000000000
--- a/examples/hooks/lenny_chroot_kpdf-nodrm.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-# This is a hook for live-build(7) to configure KDE's PDF viewer to ignore
-# manipulation restriction on "DRM protect" PDF documents.
-#
-# To enable it, copy or symlink this hook into your config/chroot_local-hooks
-# directory.
-
-if [ -d /usr/share/config ]
-then
-
-cat > /usr/share/config/kpdfpartrc << EOF
-[General]
-ObeyDRM=false
-EOF
-
-fi
diff --git a/examples/hooks/lenny_chroot_madwifi-modules.sh b/examples/hooks/lenny_chroot_madwifi-modules.sh
deleted file mode 100755
index 336e84ca3..000000000
--- a/examples/hooks/lenny_chroot_madwifi-modules.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# This is a hook for live-build(7) to install madwifi drivers
-# To enable it, copy or symlink this hook into your config/chroot_local-hooks
-# directory.
-#
-# Note: This hook requires packages from the contrib category. Make sure you enabled
-# it in your configuration.
-
-apt-get install --yes build-essential
-
-# Building kernel module
-which module-assistant || apt-get install --yes module-assistant
-module-assistant update
-
-for KERNEL in /boot/vmlinuz-*
-do
- VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')"
-
- module-assistant --non-inter --quiet auto-install madwifi -l ${VERSION}
-done
-
-module-assistant clean madwifi
-
-# Installing additional stuff
-apt-get install --yes madwifi-tools
diff --git a/examples/hooks/lenny_chroot_nvidia-legacy-modules.sh b/examples/hooks/lenny_chroot_nvidia-legacy-modules.sh
deleted file mode 100755
index 7374ce4a2..000000000
--- a/examples/hooks/lenny_chroot_nvidia-legacy-modules.sh
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/sh
-
-# This is a hook for live-build(7) to install nvidia-kernel-legacy drivers
-# To enable it, copy or symlink this hook into your config/chroot_local-hooks
-# directory.
-#
-# Note: This hook requires packages from the non-free category. Make sure you
-# enabled it in your configuration.
-
-apt-get install --yes build-essential
-
-# Building kernel module
-which module-assistant || apt-get install --yes module-assistant nvidia-kernel-common
-module-assistant update
-
-for KERNEL in /boot/vmlinuz-*
-do
- VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')"
-
- module-assistant --non-inter --quiet auto-install nvidia-kernel-legacy -l ${VERSION}
-done
-
-module-assistant clean nvidia-kernel-legacy
-
-# Installing additional stuff
-apt-get install --yes nvidia-glx-legacy nvidia-xconfig discover
-
-# Fix #421028
-if [ -f /usr/lib/xorg/modules/drivers/nvidia_drv.o ]
-then
- cd /usr/lib/xorg/modules/drivers
- gcc -shared -o nvidia_drv.so nvidia_drv.o
- cd ${OLDPWD}
-fi
-
-# Adding init script
-cat > /etc/init.d/nvidia-debian-live << EOF
-#!/bin/sh
-# script that modify xorg configuration enabling
-# the nvidia proprietary module if the card is detected
-# as an NVidia
-
-if discover --type-summary display | grep -i nvidia
-then
- # forcing depth to 24, bad detection on some card (e.g my GeForce4 440 Go)
- echo "Configuring Xorg for nvidia ..."
- nvidia-xconfig -d 24
-else
- # not with nvidia h/w ? remove those GLX diversions
- # (FIXME)
- apt-get --quiet --yes remove nvidia-glx-legacy
-fi
-EOF
-
-chmod 0755 /etc/init.d/nvidia-debian-live
-update-rc.d nvidia-debian-live defaults
diff --git a/examples/hooks/lenny_chroot_squashfs-modules.sh b/examples/hooks/lenny_chroot_squashfs-modules.sh
deleted file mode 100755
index cfa2f776c..000000000
--- a/examples/hooks/lenny_chroot_squashfs-modules.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# This is a hook for live-build(7) to install squashfs drivers
-# To enable it, copy or symlink this hook into your config/chroot_local-hooks
-# directory.
-#
-# Note: You only want to use this hook if there is no prebuild
-# squashfs-modules-* package available for your kernel flavour.
-
-apt-get install --yes build-essential
-
-# Building kernel module
-which module-assistant || apt-get install --yes module-assistant
-module-assistant update
-
-for KERNEL in /boot/vmlinuz-*
-do
- VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')"
-
- module-assistant --non-inter --quiet auto-install squashfs -l ${VERSION}
-done
-
-module-assistant clean squashfs
diff --git a/examples/hooks/lenny_chroot_sun-java5.sh b/examples/hooks/lenny_chroot_sun-java5.sh
deleted file mode 100755
index 27034a7e3..000000000
--- a/examples/hooks/lenny_chroot_sun-java5.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-# This is a hook for live-build(7) to install sun-java.
-# To enable it, copy or symlink this hook into your config/chroot_local-hooks
-# directory.
-#
-# Note: This hook requires packages from the non-free category. Make sure you
-# enabled it in your configuration.
-
-# live-build sets DEBIAN_FRONTEND to 'noninteractive' to advise debconf to not
-# ask any questions while installing packages. Suns redistribution terms for
-# Java do not allow this, therefore we need to overwrite DEBIAN_FRONTEND for
-# this apt-get call only.
-
-# In case you do accept the license terms, you can also preseed the values
-# for a complete non-interactive build, by uncommenting the following three lines:
-
-#echo "sun-java5-bin shared/accepted-sun-dlj-v1-1 boolean true" > /root/preseed
-#debconf-set-selections < /root/preseed
-#rm -f /root/preseed
-
-DEBIAN_FRONTEND="dialog" apt-get install --yes sun-java5-bin sun-java5-demo \
- sun-java5-doc sun-java5-fonts sun-java5-jdk sun-java5-jre \
- sun-java5-plugin sun-java5-source
-
-# Ensure that /tmp has the right permissions; apparently sun-java5-doc tampers
-# with it
-chmod 1777 /tmp