| 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}
|
| }
|
|
|