From 5be7db1f9f5b503f3f1c73c531e8e4ba56a7a3ae Mon Sep 17 00:00:00 2001 From: Arturo Buzarra Date: Thu, 17 Nov 2022 10:03:05 +0100 Subject: [PATCH] mount_digiparts.sh: fix support to UBI volumes on systemd According to udev documentation running programs that access to mount/umount filesystems is not allowed due to the default sandbox that is enforced on systemd-udevd.service, so on systemd systems we must to use systemd-mount binary instead of mount. Also systemd-mount does not support mount ubi devices by volume name, so we need to use the absolute device path. https://onedigi.atlassian.net/browse/DEL-8193 Signed-off-by: Arturo Buzarra --- .../recipes-core/udev/udev-extraconf/mount_digiparts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-digi-arm/recipes-core/udev/udev-extraconf/mount_digiparts.sh b/meta-digi-arm/recipes-core/udev/udev-extraconf/mount_digiparts.sh index 0f37fe9c1..2b34c50bc 100644 --- a/meta-digi-arm/recipes-core/udev/udev-extraconf/mount_digiparts.sh +++ b/meta-digi-arm/recipes-core/udev/udev-extraconf/mount_digiparts.sh @@ -95,7 +95,7 @@ elif [ "${SUBSYSTEM}" = "ubi" ]; then # In the case of a 'system' partition with many UBI volumes, the device # is always /dev/ubi0 # Mount the volume. - if ! mount -t ubifs ubi0:${PARTNAME} ${MOUNT_PARAMS} ${MOUNTPOINT}; then + if ! ${MOUNT} -t ubifs ${DEVNAME} ${MOUNT_PARAMS} ${MOUNTPOINT}; then logger -t udev "ERROR: Could not mount '${PARTNAME}' volume" rmdir --ignore-fail-on-non-empty ${MOUNTPOINT} fi