Commit Graph

3 Commits

Author SHA1 Message Date
Mike Frysinger
cc6d7b12a0 umount wrapper: fix inverted logic
The current logic exits when the output *is* "device is busy" when it
should be exiting when the output *isn't*.

BUG=chromium-os:23443
TEST=`./mod_image_for_recovery.sh` works again

Change-Id: I78eef746611de1044da664f32f8ec5e3b22b21f7
Reviewed-on: https://gerrit.chromium.org/gerrit/33170
Reviewed-by: Brian Harring <ferringb@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-09-12 22:32:18 -07:00
Mike Frysinger
4bf9456c7a umount wrapper: fix PATH cleansing
Even though we look up our wrapper script via $0, we don't use it.
Instead, the script has /usr/local/sbin hardcoded.  This causes the
code to constantly find itself and forkbomb.

BUG=chromium-os:23443
TEST=`cros_sdk -- true` no longer hangs

Change-Id: I64dc41880e3b7c0abf5da0f6a708c02510ddc8c0
Reviewed-on: https://gerrit.chromium.org/gerrit/33119
Reviewed-by: Brian Harring <ferringb@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-09-12 14:46:50 -07:00
Brian Harring
ece65e0633 Add a umount wrapper to suppress gvfsd/trashd breaking umount calls.
Specifically, detect if the umount failed due to current access, if so,
give it up to 9 more runs (w/ 1s pauses) continuing only if it's still
failing due to currently open files.

Via this, it should suppress the race of gvfs/trashd looking at
quick mounted/umounted pathways.

This CL is a two parter; this adds the script, and converts common.sh
consumers over to using the override.

The next CL will modify the chroot itself to ensure our script gets
picked up/used.

BUG=chromium-os:23443
TEST=trybot, manul validation.

Change-Id: I92dedd91d6133c2063b1e5dbbc1a68366844801d
Reviewed-on: https://gerrit.chromium.org/gerrit/32087
Commit-Ready: Brian Harring <ferringb@chromium.org>
Reviewed-by: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
2012-09-05 00:00:43 -07:00