X-Git-Url: http://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=scripts%2F02_chroot.sh;h=d22d675b8522b0a5ba0a05e8ebb34439bad89e5a;hp=fe2f84a60f1094fbc294b95f4d613ca4a554ba69;hb=5358b1f90c26e12a8492475a2199a5cfa34a8278;hpb=46e3a2d278bc75b91f6a5eae3fbdedae02441d64 diff --git a/scripts/02_chroot.sh b/scripts/02_chroot.sh index fe2f84a..d22d675 100644 --- a/scripts/02_chroot.sh +++ b/scripts/02_chroot.sh @@ -3,7 +3,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Tue Feb 13 00:16:27 CET 2007 +# Latest change: Tue Feb 13 00:37:19 CET 2007 ################################################################################ chroot_shell() { @@ -58,5 +58,33 @@ EOF esac } +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 +} + ## END OF FILE ################################################################# # vim: ai tw=80 ft=sh expandtab