summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/udev/udev-extraconf
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 23:15:59 +0100
commit8c803792badae96d3ac370976fa09cbddbc1e33d (patch)
tree2d5bde5b26c9bd70ff2126393fb209428ee546e6 /meta/recipes-core/udev/udev-extraconf
parenta153f32b1f2518c666e3371d679e3880725e6186 (diff)
downloadpoky-8c803792badae96d3ac370976fa09cbddbc1e33d.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: aa071e2f44b9f76883a7c316ea79c60ae3824d6c) 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/recipes-core/udev/udev-extraconf')
-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