fix potential data loss issue on failed umount (patch from #942)
authorFelix Fietkau <nbd@openwrt.org>
Thu, 9 Nov 2006 02:02:13 +0000 (02:02 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 9 Nov 2006 02:02:13 +0000 (02:02 +0000)
SVN-Revision: 5474

package/base-files/default/etc/hotplug.d/block/01-mount

index b6275e5a2878353061e6e8228ee4fbccb49389ac..db8ccdabd605588153cee4630a4fe66faf8c3e08 100755 (executable)
@@ -19,8 +19,8 @@ add)
        }
        ;;
 remove)
-       umount /tmp/$DEV
-       rm -rf /dev/$DEV /tmp/$DEV
+       umount /tmp/$DEV && rmdir /tmp/$DEV
+       rm -f /dev/$DEV /tmp/$DEV
        ;;
 esac
 } 2>&1 | logger