If the mounted directory is in use and the device is unplugged, umount
will fail. The bug #12056 will occur again in this situation.
This patch resolves the problem by using the "lazy" parameter of
umount and also rmdir the auto-created mount point.
Index: package/block-mount/files/40-mount
===================================================================
--- package/block-mount/files/40-mount (revision 34222)
+++ package/block-mount/files/40-mount (working copy)
@@ -82,8 +82,9 @@
reset_dev_section_cb
;;
remove)
- umount /dev/$device
- umount $mountpoint
+ umount -l /dev/$device
+ umount -l $mountpoint
+ rmdir $mountpoint
;;
esac
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel