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

Unified Diff: src/scripts/enter_chroot.sh

Issue 1711016: Add a bind mount of /dev to the chroot. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: Created 10 years, 8 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 | no next file » | 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 804d8ce64e16c4da7c15f4f710f8e2c294591ddb..77b4722897b03262132f4132e14c53b74ced4bab 100755
--- a/src/scripts/enter_chroot.sh
+++ b/src/scripts/enter_chroot.sh
@@ -93,10 +93,10 @@ function setup_env {
die "Could not mount $MOUNTED_PATH"
fi
- MOUNTED_PATH="$(readlink -f "$FLAGS_chroot/dev/pts")"
+ MOUNTED_PATH="$(readlink -f "${FLAGS_chroot}/dev")"
if [ -z "$(mount | grep -F "on $MOUNTED_PATH ")" ]
then
- sudo mount none -t devpts "$MOUNTED_PATH" || \
+ sudo mount --bind /dev "$MOUNTED_PATH" || \
die "Could not mount $MOUNTED_PATH"
fi
@@ -142,14 +142,8 @@ function setup_env {
fi
fi
- # Mount fuse device from host machine into chroot and copy over
- # corresponding kernel modules.
- MOUNTED_PATH="$(readlink -f "${FLAGS_chroot}${FUSE_DEVICE}")"
- if [ -z "$(mount | grep -F "on ${MOUNTED_PATH} ")" ] && \
- [ -c "${FUSE_DEVICE}" ] ; then
- echo "Attempting to mount fuse device for gmergefs"
- sudo touch "${MOUNTED_PATH}"
- sudo mount --bind "${FUSE_DEVICE}" "${MOUNTED_PATH}"
+ # Install fuse module.
+ if [ -c "${FUSE_DEVICE}" ] ; then
sudo modprobe fuse 2> /dev/null ||\
echo "-- Note: modprobe fuse failed. gmergefs will not work"
fi
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698