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 <kliegs@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Ready: Jon Kliegman <kliegs@chromium.org>
This commit is contained in:
Jonathan Kliegman 2011-11-25 10:17:30 -05:00 committed by Gerrit
parent 97df39f63a
commit f02a0dae85

View File

@ -50,7 +50,8 @@ fi
OUTPUT_DIR="${FLAGS_output_root}/${FLAGS_board}" 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 read -p "Are you sure (y/N)? " SURE
SURE="${SURE:0:1}" # Get just the first character SURE="${SURE:0:1}" # Get just the first character
if [ "${SURE}" != "y" ]; then if [ "${SURE}" != "y" ]; then
@ -59,4 +60,5 @@ if [ "${SURE}" != "y" ]; then
fi fi
sudo umount "$OUTPUT_DIR"/*/* 2> /dev/null sudo umount "$OUTPUT_DIR"/*/* 2> /dev/null
sudo umount /tmp/esp.* 2> /dev/null
sudo losetup -d /dev/loop* 2> /dev/null sudo losetup -d /dev/loop* 2> /dev/null