Patch by Steven Shiau <steven@nchc.org.tw>. The only changes so far are:
[live-boot-grml.git] / components / 9990-fstab.sh
1 #!/bin/sh
2
3 #set -e
4
5 Fstab ()
6 {
7         # FIXME: stop hardcoding overloading of initramfs-tools functions
8         . /scripts/functions
9         . /lib/live/boot/9990-initramfs-tools.sh
10
11         if [ -n "${NOFSTAB}" ]
12         then
13                 return
14         fi
15
16         log_begin_msg "Configuring fstab"
17
18         if ! grep -qs  "^${UNIONTYPE}" /root/etc/fstab
19         then
20                 echo "${UNIONTYPE} / ${UNIONTYPE} rw 0 0" >> /root/etc/fstab
21         fi
22
23         if ! grep -qs "^tmpfs /tmp" /root/etc/fstab
24         then
25                 echo "tmpfs /tmp tmpfs nosuid,nodev 0 0" >> /root/etc/fstab
26         fi
27
28         log_end_msg
29 }