]> piware.de Git - bin.git/blobdiff - makechroot
postinst-setup: install git-core
[bin.git] / makechroot
index c9ad108c0f2d6c3c4c5d875f0cfeeca3026ed0c8..2add2b9b71632fe0b66b4d2fd1f4a78dea978623 100755 (executable)
@@ -10,10 +10,14 @@ MIRROR="$3"
 
 mkdir -p "$DIR"
 debootstrap "$DIST" "$DIR" "$MIRROR"
+chroot $DIR apt-get install locales
 
 # debian_chroot
 echo $DIST > $DIR/etc/debian_chroot
 
+# hosts
+echo "127.0.0.1 localhost.localdomain localhost" > $DIR/etc/hosts
+
 # users
 perl -naF: -e 'print if $F[2] >= 1000 and $F[2] < 2000' /etc/passwd >> $DIR/etc/passwd
 
@@ -37,6 +41,10 @@ EOF
 fi
 
 # apt sources
+if [ "$MIRROR" != "${MIRROR%file://}" ]; then
+    MIRROR=http://archive.ubuntu.com/ubuntu
+fi
+
 cat <<EOF > $DIR/etc/apt/sources.list
 deb     $MIRROR $DIST main restricted universe multiverse
 deb-src $MIRROR $DIST main restricted universe multiverse