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

Unified Diff: scripts/image_signing/set_lsb_release.sh

Issue 3563001: set_lsb_release.sh: Make it mount rootfs r/w only if necessary. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git
Patch Set: 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 | « scripts/image_signing/common.sh ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/image_signing/set_lsb_release.sh
diff --git a/scripts/image_signing/set_lsb_release.sh b/scripts/image_signing/set_lsb_release.sh
index 3696bd25394e5075cec3c38e5261c607afacb879..9af0047a94b421d70a6685896bf6d41b8011c90e 100755
--- a/scripts/image_signing/set_lsb_release.sh
+++ b/scripts/image_signing/set_lsb_release.sh
@@ -48,9 +48,11 @@ EOF
fi
local rootfs=$(mktemp -d)
- mount_image_partition "$image" 3 "$rootfs"
+ mount_image_partition_ro "$image" 3 "$rootfs"
trap "sudo umount -d $rootfs; rm -rf $rootfs" EXIT
if [ -n "$key" ]; then
+ sudo umount -d "$rootfs"
+ mount_image_partition "$image" 3 "$rootfs"
set_lsb_release_keyval "$rootfs" "$key" "$value"
touch "$image" # Updates the image modification time.
fi
« no previous file with comments | « scripts/image_signing/common.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698