From 8c803792badae96d3ac370976fa09cbddbc1e33d Mon Sep 17 00:00:00 2001 From: Robert Tiemann Date: Thu, 2 Oct 2025 11:59:25 +0200 Subject: [PATCH] udev-extraconf: Avoid slashes in mountpoint names Devices with labels such as "Hello/World/Foo/Bar" cause mount.sh to create the directory structure @MOUNT_BASE@/Hello/World/Foo/Bar. The partition is mounted to the nested "Bar" directory. On device removal, the directory structure is not cleaned up. This commit replaces all forward slashes in partition labels by underscores to avoid this edge case. (From OE-Core rev: aa071e2f44b9f76883a7c316ea79c60ae3824d6c) Signed-off-by: Robert Tiemann Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- meta/recipes-core/udev/udev-extraconf/mount.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh index fe78f3aba5..4827779e2f 100644 --- a/meta/recipes-core/udev/udev-extraconf/mount.sh +++ b/meta/recipes-core/udev/udev-extraconf/mount.sh @@ -178,7 +178,7 @@ rm_dir() { get_label_name() { # Get the LABEL or PARTLABEL - LABEL=`/sbin/blkid "$1" | grep -o 'LABEL=".*"' | cut -d '"' -f2` + LABEL=`/sbin/blkid "$1" | grep -o 'LABEL=".*"' | cut -d '"' -f2 | sed 's,/,_,g'` # If the $DEVNAME has a LABEL or a PARTLABEL if [ -n "$LABEL" ]; then # Set the mount location dir name to LABEL appended