From f02a0dae852fc87d65845a98d301ba13de3b4b5d Mon Sep 17 00:00:00 2001 From: Jonathan Kliegman Date: Fri, 25 Nov 2011 10:17:30 -0500 Subject: [PATCH] Remove mounts from /tmp/esp.* as well /tmp/esp.* mountpoints are being leaked in update_bootloaders so clean these up too. BUG=chromium-os:23442 TEST=With stale mounts existing, run script. Observe mounts gone Change-Id: I95729bd7330157d02f27f86da495642263fe8ff6 Reviewed-on: https://gerrit.chromium.org/gerrit/12114 Tested-by: Jon Kliegman Reviewed-by: Chris Sosa Commit-Ready: Jon Kliegman --- clean_loopback_devices | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clean_loopback_devices b/clean_loopback_devices index f66244bdc3..e2ea779517 100755 --- a/clean_loopback_devices +++ b/clean_loopback_devices @@ -50,7 +50,8 @@ fi OUTPUT_DIR="${FLAGS_output_root}/${FLAGS_board}" -echo "This will unmount any directory under $OUTPUT_DIR:" +echo 'This will unmount all directories matching /tmp/esp.*' +echo "and any directory under $OUTPUT_DIR" read -p "Are you sure (y/N)? " SURE SURE="${SURE:0:1}" # Get just the first character if [ "${SURE}" != "y" ]; then @@ -59,4 +60,5 @@ if [ "${SURE}" != "y" ]; then fi sudo umount "$OUTPUT_DIR"/*/* 2> /dev/null +sudo umount /tmp/esp.* 2> /dev/null sudo losetup -d /dev/loop* 2> /dev/null