From: Michael Prokop Date: Thu, 2 Dec 2010 13:52:13 +0000 (+0100) Subject: Use /etc/apt/sources.list.d/grml.list for grml-repos, retrieve grml-debian-keyring... X-Git-Tag: v0.41~6 X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=97eb00ef4965f57bb81972b87d0e2fa4fa1ec8d2;hp=1c82a317ed3582161d4342de21ab0eb4e107d47d;ds=sidebyside Use /etc/apt/sources.list.d/grml.list for grml-repos, retrieve grml-debian-keyring package if possible Closes: issue867 --- diff --git a/chroot-script b/chroot-script index b5e60b4..21d0c92 100755 --- a/chroot-script +++ b/chroot-script @@ -73,8 +73,8 @@ chrootmirror() { grmlrepos() { if [ -n "$GRMLREPOS" ] ; then # user might have provided their own apt sources.list - if ! grep -q grml /etc/apt/sources.list 2>/dev/null ; then - cat >> /etc/apt/sources.list << EOF + if ! grep -q grml /etc/apt/sources.list.d/grml.list 2>/dev/null ; then + cat >> /etc/apt/sources.list.d/grml.list << EOF # grml: stable repository: deb http://deb.grml.org/ grml-stable main @@ -87,10 +87,15 @@ grmlrepos() { EOF fi - # make sure we have the keys available for aptitude - gpg --keyserver subkeys.pgp.net --recv-keys F61E2E7CECDEA787 - gpg --export F61E2E7CECDEA787 | apt-key add - || true # not yet sure - # why it's necessary, sometimes we get an error even though it works [mika] + if apt-get update ; then + apt-get -y --allow-unauthenticated install grml-debian-keyring + apt-get update + else + # make sure we have the keys available for aptitude + gpg --keyserver subkeys.pgp.net --recv-keys F61E2E7CECDEA787 + gpg --export F61E2E7CECDEA787 | apt-key add - || true # not yet sure + # why it's necessary, sometimes we get an error even though it works [mika] + fi # make sure we install packages from grml's pool only if not available # from Debian!