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

Unified Diff: src/scripts/enter_chroot.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 | « no previous file | src/scripts/image_to_usb.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/enter_chroot.sh
diff --git a/src/scripts/enter_chroot.sh b/src/scripts/enter_chroot.sh
index 77b4722897b03262132f4132e14c53b74ced4bab..236aa02c090d1464355dc195f31c4669b99ac268 100755
--- a/src/scripts/enter_chroot.sh
+++ b/src/scripts/enter_chroot.sh
@@ -24,6 +24,8 @@ DEFINE_string build_number "" \
"The build-bot build number (when called by buildbot only)." "b"
DEFINE_string chrome_root "" \
"The root of your chrome browser source. Should contain a 'src' subdir."
+DEFINE_string automount_dir "/media" \
+ "The directory in which your host OS creates mountpoints for external media."
DEFINE_boolean official_build $FLAGS_FALSE \
"Set CHROMEOS_OFFICIAL=1 for release builds."
@@ -100,6 +102,13 @@ function setup_env {
die "Could not mount $MOUNTED_PATH"
fi
+ MOUNTED_PATH="$(readlink -f "${FLAGS_chroot}${FLAGS_automount_dir}")"
+ if [ -z "$(mount | grep -F "on $MOUNTED_PATH ")" ]
+ then
+ sudo mount --bind "${FLAGS_automount_dir}" "$MOUNTED_PATH" || \
+ die "Could not mount $MOUNTED_PATH"
+ fi
+
MOUNTED_PATH="$(readlink -f "${FLAGS_chroot}$CHROOT_TRUNK_DIR")"
if [ -z "$(mount | grep -F "on $MOUNTED_PATH ")" ]
then
« no previous file with comments | « no previous file | src/scripts/image_to_usb.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698