if [ -n "$CONFIGURE_FSTAB" ] && ! boolean_is_true "$CONFIGURE_FSTAB"; then
    return
fi

cat >/etc/fstab <<EOF
# Dynamically generated by LTSP.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
EOF

# Backwards compatibility for the deprecated NFS_HOME lts.conf option
if [ -n "$NFS_HOME" ]; then
    # if $NFS_HOME doesn't contain a <server-ip>:/ part
    if [ "$NFS_HOME" = ${NFS_HOME#*:} ]; then
        # Ensure that it begins with a slash, and also add the server
        NFS_HOME="/${NFS_HOME#/}"
        NFS_HOME="$SERVER:$NFS_HOME"
    fi
    mntpt=${NFS_HOME##*:}
    test -n "$mntpt" && mkdir -p "$mntpt"
    NFS_HOME_OPTIONS=${NFS_HOME_OPTIONS:-defaults}
    echo "$NFS_HOME $mntpt         nfs     $NFS_HOME_OPTIONS        0       0" >> /etc/fstab
fi

# Put FSTAB_0 to FSTAB_9 lts.conf options to fstab
env | sed -n '/^FSTAB_[0-9]=/s///p' >> /etc/fstab
