X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-bottom%2F12fstab;h=ca83626da8c46cc547c4a5cb3fa021a8a7e4fd27;hb=bf36396d635f664157bef6448040c967dc96d563;hp=fa9c64238b1714df5a327508c46d95edc1442487;hpb=9fc9e2a1a11b0edada38cb501fefe4f58aa414ac;p=live-boot-grml.git diff --git a/scripts/live-bottom/12fstab b/scripts/live-bottom/12fstab index fa9c642..ca83626 100755 --- a/scripts/live-bottom/12fstab +++ b/scripts/live-bottom/12fstab @@ -1,31 +1,57 @@ #!/bin/sh +#set -e + +# initramfs-tools header + PREREQ="" -DESCRIPTION="Configuring fstab..." FSTAB=/root/etc/fstab -. /scripts/live-functions - prereqs() { - echo "$PREREQ" + echo "${PREREQ}" } -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; +case "${1}" in + prereqs) + prereqs + exit 0 + ;; esac -log_begin_msg "$DESCRIPTION" +# live-initramfs header + +. /scripts/live-functions + +if [ -n "${NOFSTAB}" ] +then + exit 0 +fi + +if [ -s ${FSTAB} ] +then + log_begin_msg "Not touching preexisting fstab..." +else + log_begin_msg "Configuring fstab..." + + cat >> ${FSTAB} <<-EOF + # /etc/fstab: static file system information. + # + # + ${UNIONTYPE} / ${UNIONTYPE} rw 0 0 + tmpfs /tmp tmpfs nosuid,nodev 0 0 + EOF +fi + +# live-initramfs script + -cat > $FSTAB <