X-Git-Url: https://piware.de/gitweb/?a=blobdiff_plain;f=makechroot;h=55dfa4120f03558b2a51c008bf5e0a47ef4166b6;hb=73f39f614bd2ef7c96785b37b75c3e9a5ae15c21;hp=c9ad108c0f2d6c3c4c5d875f0cfeeca3026ed0c8;hpb=7e936af0737b591db4b3c237adfc0e5a3b186de0;p=bin.git diff --git a/makechroot b/makechroot index c9ad108..55dfa41 100755 --- a/makechroot +++ b/makechroot @@ -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 < $DIR/etc/apt/sources.list deb $MIRROR $DIST main restricted universe multiverse deb-src $MIRROR $DIST main restricted universe multiverse @@ -51,5 +59,5 @@ EOF chroot $DIR apt-get update # common packages for development -chroot $DIR apt-get install -y build-essential devscripts fakeroot +chroot $DIR apt-get install -y build-essential fakeroot