Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 909b016d authored by Robert Nelson's avatar Robert Nelson
Browse files

bug fix: on some systems umount removes dir, so make sure directory exist before calling mount


Signed-off-by: default avatarRobert Nelson <robertcnelson@gmail.com>
parent 523dc419
Branches
Tags
No related merge requests found
......@@ -62,6 +62,11 @@ mmc_find_rootfs () {
do
PART=$(LC_ALL=C sudo fdisk -l 2>/dev/null | grep "^${MMC}" | grep "Linux" | grep -v "swap" | head -${c} | tail -1 | awk '{print $1}')
echo "Trying ${PART}"
if [ ! -d "${DIR}/deploy/disk/" ] ; then
mkdir -p "${DIR}/deploy/disk/"
fi
if sudo mount ${PART} "${DIR}/deploy/disk/" ; then
if [ -f "${DIR}/deploy/disk/etc/fstab" ] ; then
......@@ -89,6 +94,10 @@ mmc_write_boot () {
echo "Installing ${KERNEL_UTS} to boot partition"
echo "-----------------------------"
if [ ! -d "${DIR}/deploy/disk/" ] ; then
mkdir -p "${DIR}/deploy/disk/"
fi
if sudo mount -t vfat ${MMC}${PARTITION_PREFIX}${BOOT_PARITION} "${DIR}/deploy/disk/" ; then
if [ -f "${DIR}/deploy/disk/uImage_bak" ] ; then
sudo rm -f "${DIR}/deploy/disk/uImage_bak" || true
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment