X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=chroot-script;h=9de9aadffbe9e6acb449279fd8c5426b477f7f35;hp=581e6845e37a29f00024544cf3bf1fa1a9f9aa14;hb=21fca981c5a7d896281d2891518a7c181339f359;hpb=f57ddab767aa174cdee6003ed6d13a5100044d41 diff --git a/chroot-script b/chroot-script index 581e684..9de9aad 100644 --- a/chroot-script +++ b/chroot-script @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # 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,10 +13,8 @@ set -e [ -r /proc/1 ] || mount -t proc none /proc -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." - done +if [ -n "MIRROR_LIST" ] ; then + echo $MIRROR_LIST > /etc/apt/sources.list fi # install additional packages @@ -30,6 +28,12 @@ if [ "$PACKAGES" = 'yes' ] ; then fi 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." + done +fi + # set password of user root # shadowconfig passwd @@ -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