[OpenWrt-Devel] [PATCH fstools 0/2] block(d): remove remaining files if they exist

Rafał Miłecki zajec5 at gmail.com
Sat Dec 28 16:07:20 EST 2019


From: Rafał Miłecki <rafal at milecki.pl>

I noticed that rebooting with devices mounted can result in:
1) Leaving directories in /mnt/ when not using autofs
2) Leaving symlinks in /mnt/ when using autofs

They can cause mounting errors on further attempts.

With mountd this problem didn't exist due to using /tmp/mounts/ instead
of /mnt/. With block(d) we have to find some solution.

This patches takes care of removing files that can cause mounting or
symlink-ing errors. Worth implementing may be also a /mnt/ cleanup done
at boot/init time.

Rafał Miłecki (2):
  block: remove mount target file if it's a link
  blockd: remove symlink linkpath file if it's a dir or link

 block.c  | 3 +++
 blockd.c | 7 +++++++
 2 files changed, 10 insertions(+)

-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list