summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorMuhammad Hamza <Muhammad_Hamza@mentor.com>2022-07-17 14:56:43 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-25 15:11:46 +0100
commit40af8a94d881d088af0f5b67d7f3aa97d1aa9e22 (patch)
tree80fe9cfd9b167574168f084f09adfcafdf2b5ab0 /meta/recipes-core
parent2d0aed6469d91e9e9cd9e9778fcd1cbc4b259dd6 (diff)
downloadpoky-40af8a94d881d088af0f5b67d7f3aa97d1aa9e22.tar.gz
udev-extraconf/mount.sh: save mount name in our tmp filecache
Doing this will allow to fetch the exact name created by the auto-mounter during the remove action where depending on the scenario utilities such as the blkid might not be usable due to actual device not being present on the system. (From OE-Core rev: 55c2de8963cbaffdde4e527b044c3c3e3658924e) Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: Muhammad Hamza <muhammad_hamza@mentor.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit 496b76f8775a620c1d449eb6f62a41656abf2a9b) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/udev/udev-extraconf/mount.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh
index 40910be8bd..c4695ee27d 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -126,7 +126,10 @@ automount() {
126 rm_dir "$MOUNT_BASE/$name" 126 rm_dir "$MOUNT_BASE/$name"
127 else 127 else
128 logger "mount.sh/automount" "Auto-mount of [$MOUNT_BASE/$name] successful" 128 logger "mount.sh/automount" "Auto-mount of [$MOUNT_BASE/$name] successful"
129 touch "/tmp/.automount-$name" 129 # The actual device might not be present in the remove event so blkid cannot
130 # be used to calculate what name was generated here. Simply save the mount
131 # name in our tmp file.
132 echo "$name" > "/tmp/.automount-$name"
130 fi 133 fi
131} 134}
132 135