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

Side by Side Diff: memento_updater.sh

Issue 6806001: factory_installer: force updating firmware in factory install mode. (TBR) (Closed) Base URL: ssh://gitrw.chromium.org:9222/memento_softwareupdate.git@master
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # This is the autoupdater for Memento. When called it consults Omaha to see 7 # This is the autoupdater for Memento. When called it consults Omaha to see
8 # if there's an update available. If so, it downloads it to the other 8 # if there's an update available. If so, it downloads it to the other
9 # partition on the Memento USB stick, then alters the MBR and partitions 9 # partition on the Memento USB stick, then alters the MBR and partitions
10 # as needed so the next reboot will boot into the newly installed partition. 10 # as needed so the next reboot will boot into the newly installed partition.
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 326
327 # If it failed, don't update MBR but just to be safe, zero out a page of 327 # If it failed, don't update MBR but just to be safe, zero out a page of
328 # install device. 328 # install device.
329 abort_update_if_cmd_failed_long "$POSTINST_RETURN_CODE" "$MOUNTPOINT"/postinst 329 abort_update_if_cmd_failed_long "$POSTINST_RETURN_CODE" "$MOUNTPOINT"/postinst
330 # postinstall on new partition succeeded. 330 # postinstall on new partition succeeded.
331 fi 331 fi
332 332
333 if [ "${FLAGS_force_track}" = "firmware-channel" ]; then 333 if [ "${FLAGS_force_track}" = "firmware-channel" ]; then
334 log execute firmware-install script 334 log execute firmware-install script
335 INSTALL_SCRIPT="${FLAGS_dst_partition}" 335 INSTALL_SCRIPT="${FLAGS_dst_partition}"
336 /bin/sh "${INSTALL_SCRIPT}" --factory 2>&1 | cat >> "$MEMENTO_AU_LOG" 336 /bin/sh "${INSTALL_SCRIPT}" --force --mode=factory_install 2>&1 |
337 cat >> "$MEMENTO_AU_LOG"
337 [ "${PIPESTATUS[*]}" = "0 0" ] 338 [ "${PIPESTATUS[*]}" = "0 0" ]
338 FIRMWAREUPDATE_RETURN_CODE=$? 339 FIRMWAREUPDATE_RETURN_CODE=$?
339 abort_update_if_cmd_failed_long "$FIRMWAREUPDATE_RETURN_CODE" \ 340 abort_update_if_cmd_failed_long "$FIRMWAREUPDATE_RETURN_CODE" \
340 "${INSTALL_SCRIPT}" 341 "${INSTALL_SCRIPT}"
341 fi 342 fi
342 343
343 if [ -z "${FLAGS_dst_partition}" ]; then 344 if [ -z "${FLAGS_dst_partition}" ]; then
344 # mark update as complete so we don't try to update again 345 # mark update as complete so we don't try to update again
345 touch "$UPDATED_COMPLETED_FILE" 346 touch "$UPDATED_COMPLETED_FILE"
346 fi 347 fi
347 348
348 # Flush linux caches; seems to be necessary 349 # Flush linux caches; seems to be necessary
349 sync 350 sync
350 echo 3 > /proc/sys/vm/drop_caches 351 echo 3 > /proc/sys/vm/drop_caches
351 352
352 # tell user to reboot 353 # tell user to reboot
353 log Autoupdate applied. You should now reboot 354 log Autoupdate applied. You should now reboot
354 echo UPDATED 355 echo UPDATED
OLDNEW
« 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