From: martin@piware.de <> Date: Wed, 3 Jan 2007 20:52:59 +0000 (+0100) Subject: makechroot: add bind mounts to fstab X-Git-Url: https://piware.de/gitweb/?p=bin.git;a=commitdiff_plain;h=167f1d11eac547844ba046f36dc4f0d2257c6e08 makechroot: add bind mounts to fstab --- diff --git a/makechroot b/makechroot index ea959c3..c7dfd66 100755 --- a/makechroot +++ b/makechroot @@ -30,3 +30,20 @@ perl -naF: -e 'print if $F[2] >= 1000 and $F[2] < 2000' /etc/passwd >> $DIR/etc/ # locale chroot $DIR locale-gen $LANG + +# bind mounts +if ! grep -q $DIR /etc/fstab; then + cat <> /etc/fstab + +# $DIST chroot +/home $DIR/home none bind 0 0 +/proc $DIR/proc none bind 0 0 +/sys $DIR/sys none bind 0 0 +/tmp $DIR/tmp none bind 0 0 +EOF + mount $DIR/home + mount $DIR/proc + mount $DIR/sys + mount $DIR/tmp +fi +