diff options
author | Muhammad Hamza <Muhammad_Hamza@mentor.com> | 2022-07-17 14:56:43 +0200 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2022-07-17 16:59:57 -1000 |
commit | 55c2de8963cbaffdde4e527b044c3c3e3658924e (patch) | |
tree | 8da99129002816e7918469b023832977a8941222 /meta/recipes-core/udev/udev-extraconf/mount.sh | |
parent | 229e7a911a8b1e0223cfee0bdc2f5fc79cf300fe (diff) | |
download | openembedded-core-contrib-55c2de8963cbaffdde4e527b044c3c3e3658924e.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.
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>
Diffstat (limited to 'meta/recipes-core/udev/udev-extraconf/mount.sh')
-rw-r--r-- | meta/recipes-core/udev/udev-extraconf/mount.sh | 5 |
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() { rm_dir "$MOUNT_BASE/$name" else logger "mount.sh/automount" "Auto-mount of [$MOUNT_BASE/$name] successful" - touch "/tmp/.automount-$name" + # The actual device might not be present in the remove event so blkid cannot + # be used to calculate what name was generated here. Simply save the mount + # name in our tmp file. + echo "$name" > "/tmp/.automount-$name" fi } |