From aaa4b0e3748c67c5f68a24af4ce1db79ad07a878 Mon Sep 17 00:00:00 2001 From: Tong Sun Date: Sun, 5 Oct 2008 22:43:14 -0400 Subject: [PATCH] Reapply previous missing various patches for the issues mentioned in changelog mika, this should be the last time that I combine everything together. :-) --- chroot-script | 11 +++++++++-- grml-debootstrap | 1 + grml-debootstrap.8.txt | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) 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 diff --git a/grml-debootstrap b/grml-debootstrap index 99faf51..86923ea 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -722,6 +722,7 @@ preparechroot() { [ -n "$ISO" ] && echo "ISO=$ISO" >> $CHROOT_VARIABLES [ -n "$MIRROR" ] && echo "CHROOTMIRROR=$MIRROR" >> $CHROOT_VARIABLES [ -n "$MIRROR" ] && echo "MIRROR=$MIRROR" >> $CHROOT_VARIABLES + [ -n "$KEEP_SRC_LIST" ] && echo "KEEP_SRC_LIST=$KEEP_SRC_LIST" >> $CHROOT_VARIABLES [ -n "$ROOTPASSWORD" ] && echo "ROOTPASSWORD=$ROOTPASSWORD" >> $CHROOT_VARIABLES [ -n "$TARGET" ] && echo "TARGET=$TARGET" >> $CHROOT_VARIABLES [ -n "$TARGET_UUID" ] && echo "TARGET_UUID=$TARGET_UUID" >> $CHROOT_VARIABLES diff --git a/grml-debootstrap.8.txt b/grml-debootstrap.8.txt index dcb94d1..1a0880f 100644 --- a/grml-debootstrap.8.txt +++ b/grml-debootstrap.8.txt @@ -168,7 +168,7 @@ want to put existing files to the new Debian system you can place them into the /etc/debootstrap/. Every existing directory will be copied to the new Debian system then. If you want to install additional packages that are not available via the grml or debian mirror drop them into /etc/debootstrap/extrapackages and -take sure that EXTRAPACKAGES is set to "yes". +make sure that EXTRAPACKAGES is set to "yes". Automatic installation ---------------------- -- 2.1.4