Reapply previous missing various patches for the issues mentioned in changelog
authorTong Sun <suntong@cpan.org>
Mon, 6 Oct 2008 02:43:14 +0000 (22:43 -0400)
committerMichael Prokop <mika@grml.org>
Mon, 6 Oct 2008 08:12:49 +0000 (10:12 +0200)
mika, this should be the last time that I combine everything together. :-)

chroot-script
grml-debootstrap
grml-debootstrap.8.txt

index f221d50..993b0a7 100755 (executable)
@@ -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
index 99faf51..86923ea 100755 (executable)
@@ -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
index dcb94d1..1a0880f 100644 (file)
@@ -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
 ----------------------