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

Unified Diff: mk_memento_images.sh

Issue 3135024: AU: make mk_memento_images not change rootfs (Closed) Base URL: ssh://git@chromiumos-git/crosutils.git
Patch Set: Created 10 years, 4 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 | « cros_generate_update_payload ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mk_memento_images.sh
diff --git a/mk_memento_images.sh b/mk_memento_images.sh
index 8b302d8a1a4f309ef597c07d2d76d66334889a67..7bef24c430117a74b0c340764c492ed3b4d64cc7 100755
--- a/mk_memento_images.sh
+++ b/mk_memento_images.sh
@@ -15,6 +15,12 @@ if [ -z "$2" -o -z "$1" ]; then
exit 1
fi
+if [ "$CROS_GENERATE_UPDATE_PAYLOAD_CALLED" != "1" ]; then
Nick Sanders 2010/08/16 22:28:59 Please don't check this in, it will break the fact
+ echo "This script should only be called from cros_generate_update_payload"
+ echo "Please run that script with --help to see how to use it."
+ exit 1
+fi
+
if [ $(whoami) = "root" ]; then
echo "running $0 as root which is unneccessary"
fi
@@ -51,19 +57,8 @@ if [ $(stat -c%s "$UNCOMPRESSED_OUT_FILE") -ne $((8 + $KPART_SIZE)) ]; then
exit 1
fi
-# Copy rootfs aside
-TMP_ROOTFS=$(mktemp)
-cp "$ROOT_PART" "$TMP_ROOTFS"
-ORIGINAL_LABEL=$(/sbin/e2label "$TMP_ROOTFS")
-NEW_LABEL="A${ORIGINAL_LABEL}"
-/sbin/tune2fs -L "$NEW_LABEL" "$TMP_ROOTFS"
-
-# TODO(adlr): Sign TMP_ROOTFS w/ OS vendor's private key
-
# Put rootfs into the out file
-cat "$TMP_ROOTFS" >> "$UNCOMPRESSED_OUT_FILE"
-
-rm "$TMP_ROOTFS"
+cat "$ROOT_PART" >> "$UNCOMPRESSED_OUT_FILE"
# compress and hash
CS_AND_RET_CODES=$(gzip -c "$UNCOMPRESSED_OUT_FILE" | \
« no previous file with comments | « cros_generate_update_payload ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698