mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-22 22:21:10 +02:00
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:
parent
97df39f63a
commit
f02a0dae85
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user