X-Git-Url: https://piware.de/gitweb/?a=blobdiff_plain;f=makechroot;h=7188ad2a6cf294ffb9bc5d68b6d60580a7b722a5;hb=a34c779e77a7630f63a1dd8128fe9a9377382132;hp=1028c213ba6e197a3531a86c2ee867036afffb51;hpb=e630f8d057665e5f0e1e1a48b3030320f28948a2;p=bin.git diff --git a/makechroot b/makechroot index 1028c21..7188ad2 100755 --- a/makechroot +++ b/makechroot @@ -3,12 +3,20 @@ DIST="$1" DIR="$2" MIRROR="$3" +[ "$DIST" ] && [ "$DIR" ] && [ "$MIRROR" ] || { + echo "Usage: $0 " >&2 + exit 1 +} + mkdir -p "$DIR" debootstrap "$DIST" "$DIR" "$MIRROR" # 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