X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=chroot-script;h=993b0a7d0432d910d4c309c728c1a25eefa00411;hp=f221d500aa4eccae6760becbd62936057b5ece56;hb=aaa4b0e3748c67c5f68a24af4ce1db79ad07a878;hpb=df0f07e25b7de55740c79376b65cf962ffb3833f diff --git a/chroot-script b/chroot-script index f221d50..993b0a7 100755 --- a/chroot-script +++ b/chroot-script @@ -44,6 +44,7 @@ stage() { # define chroot mirror {{{ chrootmirror() { + [ -n "$KEEP_SRC_LIST" ] && return if [ -n "$ISO" ] ; then echo "deb $ISO $RELEASE main contrib" > /etc/apt/sources.list [ -n "$CHROOTMIRROR" ] && echo "deb $CHROOTMIRROR $RELEASE main contrib non-free" >> /etc/apt/sources.list @@ -58,7 +59,9 @@ chrootmirror() { # set up grml repository {{{ grmlrepos() { if [ -n "$GRMLREPOS" ] ; then - cat >> /etc/apt/sources.list << EOF + # 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 # grml: stable repository: deb http://deb.grml.org/ grml-stable main @@ -69,6 +72,8 @@ grmlrepos() { deb-src http://deb.grml.org/ grml-testing main 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 - || /bin/true # not yet sure @@ -133,8 +138,10 @@ EOF packages() { # Pre-seed the debconf database with answers. Each question will be marked # as seen to prevent debconf from asking the question interactively. - [ -f /etc/debootstrap/debconf-selections ] && \ + [ -f /etc/debootstrap/debconf-selections ] && { + echo "Preseeding the debconf database, some lines might be skipped..." cat /etc/debootstrap/debconf-selections | debconf-set-selections + } if [ "$PACKAGES" = 'yes' ] ; then if ! [ -r /etc/debootstrap/packages ] ; then