Only remove $TMP_BUILD_DIR on cleanup

During ramdisk cleanup if for some reason the filesystems mounted
in $TMP_BUILD_DIR were not removed this recursive delete ended up
deleting parts of the host filesystem that were mounted (in particular
most of the contents of /dev got removed.

This commit doesn't deal with the reason the filesystem didn't unmounted
but ensures the consequences are not as severe.

Fixes Bug 1202612

Change-Id: Id8eba0753c2fe76c79ae1d952ce690d26e33e3ed
This commit is contained in:
Derek Higgins 2013-07-26 10:42:47 +01:00
parent f33c4ebdde
commit e79968f682

View File

@ -26,7 +26,7 @@ function fullpath() {
function cleanup () {
sudo umount -f $TMP_BUILD_DIR || true
rm -rf "$TMP_BUILD_DIR"
rm -rf --one-file-system "$TMP_BUILD_DIR"
}
function create_ramdisk_base () {