From 42612e112ef3bd0fdf63f6dc2f18e958dfdbded1 Mon Sep 17 00:00:00 2001 From: Mike Engel Date: Mon, 22 Jul 2019 09:39:43 +0200 Subject: [PATCH] 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 https://jira.digi.com/browse/DEL-6655 --- .../base-files/base-files_3.0.14.bbappend | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/meta-digi-dey/recipes-core/base-files/base-files_3.0.14.bbappend b/meta-digi-dey/recipes-core/base-files/base-files_3.0.14.bbappend index 8173b2067..657b70da0 100644 --- a/meta-digi-dey/recipes-core/base-files/base-files_3.0.14.bbappend +++ b/meta-digi-dey/recipes-core/base-files/base-files_3.0.14.bbappend @@ -1,4 +1,4 @@ -# Copyright (C) 2013-2018 Digi International. +# Copyright (C) 2013-2019 Digi International. FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" @@ -34,6 +34,22 @@ pkg_postinst_ontarget_${PN}() { fi done 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"