From e3eab11e630a2119b09c8daebe9d8038a03d178b Mon Sep 17 00:00:00 2001 From: nbd Date: Thu, 9 Nov 2006 02:02:13 +0000 Subject: 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 --- package/base-files/default/etc/hotplug.d/block/01-mount | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'package/base-files/default/etc/hotplug.d') 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 -- cgit v1.2.3