76814ddc546cb0d09ff4bb9da6e0c880a87b9f0b
[grml-live.git] / etc / grml / fai / config / scripts / GRMLBASE / 02-mtab
1 #!/bin/bash
2 # Filename:      /etc/grml/fai/config/scripts/GRMLBASE/02-mtab
3 # Purpose:       create mtab if it does not yet exist
4 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports:   see http://grml.org/bugs/
6 # License:       This file is licensed under the GPL v2 or any later version.
7 ################################################################################
8
9 set -u
10 set -e
11
12 [ -r /etc/grml/grml-live.conf ]  && . /etc/grml/grml-live.conf
13 [ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local
14
15 # newer debootstrap does not create an mtab.
16 # create it and fill it with what is probably already mounted.
17 if [ ! -e $target/etc/mtab ] ; then
18   cat > $target/etc/mtab << EOF
19 proc /proc proc rw 0 0
20 sysfs /sys sysfs rw 0 0
21 /dev /dev tmpfs rw 0 0
22 devpts /dev/pts devpts rw 0 0
23 EOF
24 fi
25
26 ## END OF FILE #################################################################
27 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3