Return a non-zero exit code if cleanup fails.

This is an attempt to work around, which is believed to
be caused by non-atomic umount, which is believed to be a kernel bug.

If any command returns an error during the cleanup, make the
script return a non-zero exit code. This triggers additional logging in
most call sites for the script.

Also, dump mount related debug info after every umount or rmdir failure to
help try and diagnose this.

TEST=Local payload generation.

Change-Id: I014bd372f5c55e64383572df27b3cbba9b944337
Reviewed-by: Don Garrett <>
Commit-Queue: Don Garrett <>
Tested-by: Don Garrett <>
1 file changed