support
[grml-debootstrap.git] / chroot-script
index 581e684..ee169b0 100644 (file)
@@ -4,7 +4,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Fre Nov 03 11:17:14 CET 2006 [mika]
+# Latest change: Fre Nov 03 11:37:19 CET 2006 [mika]
 ################################################################################
 
 set -e
@@ -13,6 +13,10 @@ set -e
 
 [ -r /proc/1 ] || mount -t proc   none /proc
 
+if [ -n "MIRROR_LIST" ] ; then
+   echo $MIRROR_LIST > /etc/apt/sources.list
+fi
+
 if [ -n "$RECONFIGURE" ] ; then
    for package in $RECONFIGURE ; do
        dpkg --list $package && dpkg-reconfigure $package || echo "Warning: $package does not exist, can not reconfigure it."
@@ -145,7 +149,10 @@ image=/boot/vmlinuz-2.6.17-grml
 EOF
 fi
 
-# unmount all filesystems in chroot
+# unmount all filesystems in chroot, make sure nothing is left...
+umount -a
+umount /proc
+umount /proc
 umount -a
 
 # finally exit the chroot