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

Unified Diff: mod_image_for_dev_recovery.sh

Issue 3439024: remove second call to free up loop device (Closed) Base URL: http://git.chromium.org/git/crosutils.git
Patch Set: test Created 10 years, 3 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: mod_image_for_dev_recovery.sh
diff --git a/mod_image_for_dev_recovery.sh b/mod_image_for_dev_recovery.sh
index 7523e594863296e765e0f12ccb7e28d0317a5f61..e94f687b6dc793c04105be02feac1ce769d25f45 100755
--- a/mod_image_for_dev_recovery.sh
+++ b/mod_image_for_dev_recovery.sh
@@ -176,7 +176,7 @@ create_dev_recovery_image() {
# Mount resized stateful FS and copy payload content to its root directory
local temp_mnt=$(mktemp -d "/tmp/temp_mnt.XXXXXX")
local loop_dev=$(get_loop_dev)
- trap "umount_from_loop_dev ${temp_mnt} && cleanup_loop_dev ${loop_dev}" EXIT
+ trap "umount_from_loop_dev ${temp_mnt} && rm -f \"${temp_state}\"" EXIT
mkdir -p "${temp_mnt}"
sudo mount -o loop=${loop_dev} "${temp_state}" "${temp_mnt}"
sudo cp -R "${FLAGS_payload_dir}" "${temp_mnt}"
@@ -189,7 +189,6 @@ create_dev_recovery_image() {
# TODO(tgao): handle install script (for default and custom cases)
local temp_img=$(update_partition_table $temp_state $resized_sectors)
- rm -f "${temp_state}"
# trap handler will clean up loop device and temp mount point
echo ${temp_img}
}
« 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