summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/udev
diff options
context:
space:
mode:
authorMuhammad Hamza <Muhammad_Hamza@mentor.com>2022-06-20 13:17:55 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-06-21 17:44:27 (GMT)
commit27b5d5ad5be0a0d1a6c8aadc8af8228ccea322e0 (patch)
tree826c1e9ea2eba1cd507bb7f03e051edf07c5e796 /meta/recipes-core/udev
parentaab4152eff4d3df3153307cf37ef8c80009991f5 (diff)
downloadpoky-27b5d5ad5be0a0d1a6c8aadc8af8228ccea322e0.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: 496b76f8775a620c1d449eb6f62a41656abf2a9b) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/udev')
-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 40910be..c4695ee 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