From 883141830a838a0ae9090ca02ad64ab3f7813b41 Mon Sep 17 00:00:00 2001 From: Tatiana Leon Date: Fri, 18 Nov 2022 10:42:52 +0100 Subject: [PATCH] mount_digiparts.sh: some script improvements * Use 'MOUNT' variable instead of 'mount' command * On the MTD subsystem event, stop looping once the UBI device number is found Signed-off-by: Tatiana Leon --- .../recipes-core/udev/udev-extraconf/mount_digiparts.sh | 3 ++- 1 file changed, 2 insertions(+), 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 11387a9c3..7fd4749b4 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 @@ -86,6 +86,7 @@ elif [ "${SUBSYSTEM}" = "mtd" ]; then mtd_att="$(cat ${ubidev}/mtd_num)" if [ "${mtd_att}" = "${MTD_NUM}" ]; then dev_number="$(echo ${ubidev} | sed -ne 's,.*ubi\([0-9]\+\),\1,g;T;p')" + break fi done @@ -96,7 +97,7 @@ elif [ "${SUBSYSTEM}" = "mtd" ]; then # Check if volume exists. if ubinfo /dev/ubi${dev_number} -N ${PARTNAME} >/dev/null 2>&1; then # Mount the volume. - if ! mount -t ubifs ubi${dev_number}:${PARTNAME} ${MOUNT_PARAMS} ${MOUNTPOINT}; then + if ! ${MOUNT} -t ubifs ubi${dev_number}:${PARTNAME} ${MOUNT_PARAMS} ${MOUNTPOINT}; then logger -t udev "ERROR: Could not mount '${PARTNAME}' partition" rmdir --ignore-fail-on-non-empty ${MOUNTPOINT} fi