#!/bin/sh set -u set -e # Mount first partition to access config files if [ -e ${TARGET_DIR}/etc/fstab ]; then if ! grep -qE '^\/dev\/mmcblk0p1' "${TARGET_DIR}/etc/fstab"; then cat << __EOF__ >> "${TARGET_DIR}/etc/fstab" /dev/mmcblk0p1 /mnt vfat defaults,ro 0 0 __EOF__ fi fi