From: nbd Date: Thu, 9 Nov 2006 02:02:13 +0000 (+0000) Subject: fix potential data loss issue on failed umount (patch from #942) X-Git-Url: https://git.rohieb.name/openwrt.git/commitdiff_plain/e3eab11e630a2119b09c8daebe9d8038a03d178b fix potential data loss issue on failed umount (patch from #942) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5474 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/package/base-files/default/etc/hotplug.d/block/01-mount b/package/base-files/default/etc/hotplug.d/block/01-mount index b6275e5a2..db8ccdabd 100755 --- a/package/base-files/default/etc/hotplug.d/block/01-mount +++ b/package/base-files/default/etc/hotplug.d/block/01-mount @@ -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