add support for mounting the cow device on an nfs volume
[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 if [ -s ${FSTAB} ]
32 then
33         log_begin_msg "Not touching preexisting fstab..."
34 else
35         log_begin_msg "Configuring fstab..."
36
37         cat >> ${FSTAB} <<-EOF
38         # /etc/fstab: static file system information.
39         #
40         # <file system> <mount point>   <type>  <options>       <dump>  <pass>
41         ${UNIONTYPE} / ${UNIONTYPE} rw 0 0
42         tmpfs /tmp tmpfs nosuid,nodev 0 0
43         EOF
44 fi
45
46 # live-initramfs script
47
48
49 # disabled for now
50 #rm -f /root/etc/rcS.d/S*checkroot.sh
51
52 if [ "${NOFASTBOOT}" != "Yes" ]
53 then
54         touch root/fastboot
55 fi
56
57 log_end_msg