]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
udev-extraconf: use -H for unmount tmpfile find
authorJate Sujjavanich <jatedev@gmail.com>
Fri, 22 May 2026 01:37:14 +0000 (21:37 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 28 May 2026 10:21:53 +0000 (11:21 +0100)
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>
meta/recipes-core/udev/udev-extraconf/mount.sh

index 3ddee84b785cb9b4ffeaf7d6e367cf1f59aad660..81c5d1c58cd60b255ced1007246da39d1c1ceb46 100644 (file)
@@ -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 " " `