f38eee722f4fdcd1ed1c4b94b1d2b8698cffce4c
[live-boot-grml.git] / scripts / live-bottom / 12fstab
1 #!/bin/sh
2
3 #set -e
4
5 # initramfs-tools header
6
7 PREREQ=""
8 FSTAB=/root/etc/fstab
9
10 prereqs()
11 {
12         echo "${PREREQ}"
13 }
14
15 case "${1}" in
16         prereqs)
17                 prereqs
18                 exit 0
19                 ;;
20 esac
21
22 # live-initramfs header
23
24 . /scripts/live-functions
25
26 if [ -n "${NOFSTAB}" ]
27 then
28         exit 0
29 fi
30
31 log_begin_msg "Configuring fstab"
32
33 # live-initramfs script
34
35 # Create a fake fstab only if it is not already there
36 if [ ! -f "${FSTAB}" ] || grep -qs 'UNCONFIGURED FSTAB FOR BASE SYSTEM' "${FSTAB}"
37 then
38         cat >> ${FSTAB} << EOF
39 # /etc/fstab: static file system information.
40 #
41 # <file system> <mount point>   <type>  <options>       <dump>  <pass>
42
43 ${UNIONTYPE} / ${UNIONTYPE} rw 0 0
44 tmpfs /tmp tmpfs nosuid,nodev 0 0
45 EOF
46 fi
47
48 # disabled for now
49 #rm -f /root/etc/rcS.d/S*checkroot.sh
50
51 if [ "${NOFASTBOOT}" != "Yes" ]
52 then
53         touch root/fastboot
54 fi
55
56 log_end_msg