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

Unified Diff: src/platform/memento_softwareupdate/memento_updater.sh

Issue 1520028: New Full AU Format w/ support for kernel partition. (Closed)
Patch Set: fixes for review Created 10 years, 8 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 | « src/platform/memento_softwareupdate/Makefile ('k') | src/platform/memento_softwareupdate/split_write.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/memento_softwareupdate/memento_updater.sh
diff --git a/src/platform/memento_softwareupdate/memento_updater.sh b/src/platform/memento_softwareupdate/memento_updater.sh
index 37e507733c1019bbe52aa88c211912a8d2965af6..9004afdac58d2177d78a3670630bede7ade7d49f 100644
--- a/src/platform/memento_softwareupdate/memento_updater.sh
+++ b/src/platform/memento_softwareupdate/memento_updater.sh
@@ -146,6 +146,12 @@ NEW_PART_NUM=${INSTALL_DEV##*/*[a-z]}
# partitions 4&5 are image B.
KINSTALL_DEV=$(echo $INSTALL_DEV | tr '35' '24')
+if [ "$KINSTALL_DEV" = "$INSTALL_DEV" ]; then
+ log "kernel install partition the same as rootfs install partition!"
+ log " (${KINSTALL_DEV})"
+ exit 1
+fi
+
# Find whole disk device.
ROOT_DEV=${INSTALL_DEV%%[0-9]*}
@@ -197,9 +203,10 @@ CHECKSUM_FILE="/tmp/memento_autoupdate_checksum"
RETURNED_CODES=$(wget -O - --load-cookies <(echo "$COOKIES") \
"$IMG_URL" 2>> "$MEMENTO_AU_LOG" | \
tee >(openssl sha1 -binary | openssl base64 > "$CHECKSUM_FILE") | \
- gzip -d > "$INSTALL_DEV" ; echo ${PIPESTATUS[*]})
+ gzip -d | $(dirname "$0")/split_write "$KINSTALL_DEV" "$INSTALL_DEV" ; \
+ echo ${PIPESTATUS[*]})
-EXPECTED_CODES="0 0 0"
+EXPECTED_CODES="0 0 0 0"
CALCULATED_CS=$(cat "$CHECKSUM_FILE")
rm -f "$CHECKSUM_FILE"
@@ -264,8 +271,7 @@ if [ -z "${FLAGS_dst_partition}" ]; then
fi
fi
-"$MOUNTPOINT"/postinst "$INSTALL_DEV" "$KINSTALL_DEV" 2>&1 | \
- cat >> "$MEMENTO_AU_LOG"
+"$MOUNTPOINT"/postinst "$INSTALL_DEV" 2>&1 | cat >> "$MEMENTO_AU_LOG"
[ "${PIPESTATUS[*]}" = "0 0" ]
POSTINST_RETURN_CODE=$?
umount "$MOUNTPOINT"
« no previous file with comments | « src/platform/memento_softwareupdate/Makefile ('k') | src/platform/memento_softwareupdate/split_write.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698