diff mbox series

[wrynose,15/36] udev-extraconf: use -H for unmount tmpfile find

Message ID df3dbb5085f6fe4dfe2df78973a48f80c32a5356.1781960051.git.yoann.congal@smile.fr
State New
Headers show
Series [wrynose,01/36] gcc: Upgrade GCC to 15.3 release | expand

Commit Message

Yoann Congal June 20, 2026, 12:59 p.m. UTC
From: Jate Sujjavanich <jatedev@gmail.com>

Add -H option to find of automount files in /tmp to allow find to
follow /tmp if it is a symlink to a volatile file system. This option
also avoids following any links within /tmp.

Otherwise the find for the automount tmp file does not work which
prevents the removal of the automount directory. Then subsequent
auto-mounts fail.

Signed-off-by: Jate Sujjavanich <jatedev@gmail.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a79457cfdc8b3e0136a19099cd7cfca19183a55b)
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
---
 meta/recipes-core/udev/udev-extraconf/mount.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh
index 3ddee84b785..81c5d1c58cd 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -207,7 +207,7 @@  fi
 
 if [ "$ACTION" = "remove" ] || [ "$ACTION" = "change" ] && [ -x "$UMOUNT" ] && [ -n "$DEVNAME" ]; then
     name="`basename "$DEVNAME"`"
-    tmpfile=`find /tmp | grep "\.automount-.*${name}$"`
+    tmpfile=`find -H /tmp | grep "\.automount-.*${name}$"`
     if [ ! -e "/sys/$DEVPATH" -a -e "$tmpfile" ]; then
         logger "mount.sh/remove" "cleaning up $DEVNAME, was mounted by the auto-mounter"
         for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " `