Browse Source

fix potential data loss issue on failed umount (patch from #942)

SVN-Revision: 5474
Felix Fietkau 19 years ago
parent
commit
e3e87f09d9
1 changed files with 2 additions and 2 deletions
  1. 2 2
      package/base-files/default/etc/hotplug.d/block/01-mount

+ 2 - 2
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