From e79968f6825093a2f9aa8fb7040004cb8fe42739 Mon Sep 17 00:00:00 2001 From: Derek Higgins Date: Fri, 26 Jul 2013 10:42:47 +0100 Subject: [PATCH] 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 --- lib/ramdisk-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ramdisk-functions b/lib/ramdisk-functions index dd5d4b60..87bdc978 100644 --- a/lib/ramdisk-functions +++ b/lib/ramdisk-functions @@ -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 () {