meta-digi-dey: base-file: disable file system check on the root file system partition when encrypted

This commit disables file system check on the root file system when it is encrypted.
This prevents the service from failing on encrypted rootfs with the message:

[FAILED] Failed to mount /run/media/mmcblk0p3.
See 'systemctl status run-media-mmcblk0p3.mount' for details.

Signed-off-by: Mike Engel <Mike.Engel@digi.com>

https://jira.digi.com/browse/DEL-6655
This commit is contained in:
Mike Engel 2019-07-22 09:39:43 +02:00
parent acb150e8c7
commit 42612e112e
1 changed files with 17 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# Copyright (C) 2013-2018 Digi International. # Copyright (C) 2013-2019 Digi International.
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
@ -34,6 +34,22 @@ pkg_postinst_ontarget_${PN}() {
fi fi
done done
fi fi
# Disable file system check when rootfs is encrypted
if [ -n "${TRUSTFENCE_INITRAMFS_IMAGE}" ]; then
for arg in $(cat /proc/cmdline); do
case "${arg}" in
root=*) eval ${arg};;
esac
done
# Are we running from NAND
if echo "${root}" | grep -qs ubi; then
root="/dev/${root}"
else
root="$(findfs ${root})"
fi
echo "${root} / auto defaults 0 0" >> /etc/fstab
fi
} }
CONFFILES_${PN} += "${sysconfdir}/sysctl.conf" CONFFILES_${PN} += "${sysconfdir}/sysctl.conf"