+chroot_live_prepare() {
+ debug "preparing grml-live directory in chroot"
+ if [ -n "$SOURCES_LIST" ] ; then
+ echo $SOURCES_LIST > "${TARGET}"/grml-live/files/sources.list
+ fi
+
+ cat > "${TARGET}"/grml-live/scripts/install_packages.sh << EOF
+#!/bin/sh
+
+if ! [ -f /etc/apt/grml.key ] ; then
+ gpg --keyserver subkeys.pgp.net --recv-keys F61E2E7CECDEA787
+ gpg --export F61E2E7CECDEA787 > /etc/apt/grml.key
+ apt-key add /etc/apt/grml.key
+fi
+
+apt-get update
+apt-get upgrade
+
+EOF
+
+ chmod 755 "${TARGET}"/grml-live/scripts/install_packages.sh
+}
+
+chroot_live_execute() {
+ debug "executing grml-live script in chroot"
+ chroot_exec /grml-live/scripts/install_packages.sh
+}
+