mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 11:51:14 +02:00
Stop the gvfsd-trash daemon during enter_chroot.
The gvfsd-trash daemon interferes with mounting and unmounting
images, so it should also be disabled for user chroots.
The gvfsd-trash daemon automagically creates 'trash' subdirectory inside
any directory you mount and holds on to it for a little while, preventing
you from being able to unmount your mount point.
BUG=chromium-os:23443
TEST=Verify that this fix fixes cros_make_image_bootable for daisy on
Ubuntu precise.
Change-Id: I8df4c999ed57d7025b63c971390448c93d404e83
Reviewed-on: https://gerrit.chromium.org/gerrit/25243
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Anush Elangovan <anush@google.com>
Tested-by: David James <davidjames@chromium.org>
This commit is contained in:
parent
fae0a59e8b
commit
654a00bd61
@ -381,10 +381,10 @@ setup_env() {
|
||||
fi
|
||||
|
||||
# Turn off automounting of external media when we enter the chroot by
|
||||
# stopping the gvfs-gdu-volume-monitor. This is currently the most
|
||||
# reliable way to disable automounting.
|
||||
# stopping the gvfs-gdu-volume-monitor and gvfsd-trash daemons. This is
|
||||
# currently the most reliable way to disable automounting.
|
||||
# See https://bugzilla.gnome.org/show_bug.cgi?id=677648
|
||||
sudo killall -STOP gvfs-gdu-volume-monitor 2>/dev/null || true
|
||||
sudo killall -STOP gvfs-gdu-volume-monitor gvfsd-trash 2>/dev/null || true
|
||||
|
||||
# Configure committer username and email in chroot .gitconfig. Change
|
||||
# to the root directory first so that random $PWD/.git/config settings
|
||||
@ -515,7 +515,7 @@ teardown_env() {
|
||||
safe_umount_tree "${MOUNTED_PATH}/"
|
||||
|
||||
# Now that we've exited the chroot, allow automounting again.
|
||||
sudo killall -CONT gvfs-gdu-volume-monitor 2>/dev/null || true
|
||||
sudo killall -CONT gvfs-gdu-volume-monitor gvfsd-trash 2>/dev/null || true
|
||||
fi
|
||||
) 200>>"$LOCKFILE" || die "teardown_env failed"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user