summaryrefslogtreecommitdiff
path: root/package/base-files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-11-09 02:02:13 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-11-09 02:02:13 +0000
commite3e87f09d912a1891590b6d31619eb28ad8e9469 (patch)
treeea3df9772f5ee87e7f38b6be6dd4b7e7073150ff /package/base-files
parentf80c6e9e292877d4c94a27fd46f73390b30d781c (diff)
downloadmtk-20170518-e3e87f09d912a1891590b6d31619eb28ad8e9469.zip
mtk-20170518-e3e87f09d912a1891590b6d31619eb28ad8e9469.tar.gz
mtk-20170518-e3e87f09d912a1891590b6d31619eb28ad8e9469.tar.bz2
fix potential data loss issue on failed umount (patch from #942)
SVN-Revision: 5474
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/default/etc/hotplug.d/block/01-mount4
1 files changed, 2 insertions, 2 deletions
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 b6275e5..db8ccda 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