]> piware.de Git - bin.git/commitdiff
makechroot: add bind mounts to fstab
authormartin@piware.de <>
Wed, 3 Jan 2007 20:52:59 +0000 (21:52 +0100)
committermartin@piware.de <>
Wed, 3 Jan 2007 20:52:59 +0000 (21:52 +0100)
makechroot

index ea959c3fc25b6f661569c1ff7f5773b916e696ea..c7dfd668fb11796d1cb45db51afb7d8cee6420dd 100755 (executable)
@@ -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 <<EOF >> /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
+