From 99d111468f748f55bbe2afaeb7cb4ef4b756e469 Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Tue, 26 Jul 2022 18:11:32 +0200 Subject: udev-toradex-rules: fix a mountpoint issue When toradex-mount-bootpart.sh is triggered by bootpart-automount.rules, the mountpoint of boot partition might not be created yet since "$MOUNT --no-block" is being used in /etc/udev/scripts/mount.sh. Let's change to calculate mountpoint from label and device name instead. Related-to: ELB-4620 Signed-off-by: Ming Liu --- recipes-core/udev/files/toradex-mount-bootpart.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'recipes-core') diff --git a/recipes-core/udev/files/toradex-mount-bootpart.sh b/recipes-core/udev/files/toradex-mount-bootpart.sh index 965d747..8e2e596 100755 --- a/recipes-core/udev/files/toradex-mount-bootpart.sh +++ b/recipes-core/udev/files/toradex-mount-bootpart.sh @@ -8,8 +8,8 @@ BASEUUID=$(sed -r 's/^.*\broot=PARTUUID=([0-9a-f]+)-02.*$/\1/' /proc/cmdline) BOOTPART=$(readlink -f /dev/disk/by-partuuid/"${BASEUUID}-01") if [ x"$DEVNAME" = x"$BOOTPART" ]; then - MOUNTPOINT="$(lsblk -o MOUNTPOINT -nr "$DEVNAME" | head -1)" - MOUNTNAME="$(basename "$MOUNTPOINT")" + MOUNTNAME="$(/sbin/blkid | grep "$DEVNAME:" | grep -o 'LABEL=".*"' | cut -d '"' -f2)-$(basename "$DEVNAME")" + MOUNTPOINT="$(sed -n 's/MOUNT_BASE=\"\(.*\)\"/\1/p' /etc/udev/scripts/mount.sh)/$MOUNTNAME" BASE_INIT="$(readlink -f "@base_sbindir@/init")" INIT_SYSTEMD="@systemd_unitdir@/systemd" -- cgit v1.2.3