Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(622)

Unified Diff: src/scripts/image_to_usb.sh

Issue 1991006: add the ability to umount automounted devices from within the chroot (Closed) Base URL: ssh://git@chromiumos-git//chromeos
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/scripts/enter_chroot.sh ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/image_to_usb.sh
diff --git a/src/scripts/image_to_usb.sh b/src/scripts/image_to_usb.sh
index ff1a1bbd801e0edb35a195a1534d453a2c49e117..d1ac0b28a2b257c71436a4a6532a622ff5715d17 100755
--- a/src/scripts/image_to_usb.sh
+++ b/src/scripts/image_to_usb.sh
@@ -232,7 +232,14 @@ then
echo "Attempting to unmount any mounts on the USB device..."
for i in $(mount | grep ^"${FLAGS_to}" | awk '{print $1}')
do
- sudo umount "$i"
+ if sudo umount "$i" 2>&1 >/dev/null | grep "not found"; then
+ echo
+ echo "The device you have specified is already mounted at some point "
+ echo "that is not visible from inside the chroot. Please unmount the "
+ echo "device manually from outside the chroot and try again."
+ echo
+ exit 1
+ fi
done
sleep 3
« no previous file with comments | « src/scripts/enter_chroot.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698