summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRobert Tiemann <rtie@gmx.de>2025-10-02 11:59:25 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-10-06 17:01:10 +0100
commit898731ef0027cf3f05d1ee59d99698af3cfef9b6 (patch)
tree0605d3765de81c5aaba03d68c5768a11270eeb0e /meta
parent36687d227194bee38b6f245e425245fb23265f37 (diff)
downloadpoky-898731ef0027cf3f05d1ee59d99698af3cfef9b6.tar.gz
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: c59a2073ac282b0b517d7b51ff124c2ab76a84e1) Signed-off-by: Robert Tiemann <rtie@gmx.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/udev/udev-extraconf/mount.sh2
1 files changed, 1 insertions, 1 deletions
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() {
178 178
179get_label_name() { 179get_label_name() {
180 # Get the LABEL or PARTLABEL 180 # Get the LABEL or PARTLABEL
181 LABEL=`/sbin/blkid "$1" | grep -o 'LABEL=".*"' | cut -d '"' -f2` 181 LABEL=`/sbin/blkid "$1" | grep -o 'LABEL=".*"' | cut -d '"' -f2 | sed 's,/,_,g'`
182 # If the $DEVNAME has a LABEL or a PARTLABEL 182 # If the $DEVNAME has a LABEL or a PARTLABEL
183 if [ -n "$LABEL" ]; then 183 if [ -n "$LABEL" ]; then
184 # Set the mount location dir name to LABEL appended 184 # Set the mount location dir name to LABEL appended