From: Felix Fietkau 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: http://git.lede-project.org./?a=commitdiff_plain;h=e3e87f09d912a1891590b6d31619eb28ad8e9469;p=openwrt%2Fstaging%2Fmans0n.git fix potential data loss issue on failed umount (patch from #942) SVN-Revision: 5474 --- 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 b6275e5a28..db8ccdabd6 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