image_to_live was not providing a URL to the stateful_update script executed on the remote machine. Without the URL, stateful_update would default to reading /mnt/stateful_partition/etc/lsb-release for the URL, which is not setup by the script.

I've modified image_to_live to convert the dev server url into the proper form to access the stateful.image.gz and pass it along to stateful_update on the remote system.

Change-Id: I77971c83b7efef5f053fda7fcd2585ca73f3134a

BUG=6705
TEST=Imaged several machines using Dev Server.

Review URL: http://codereview.chromium.org/3417001
This commit is contained in:
Dale Curtis 2010-09-14 13:03:11 -07:00
parent 6c6000b2c2
commit d0a2e12511

View File

@ -69,12 +69,22 @@ function start_dev_server {
# from the dev server and prepares the update. chromeos_startup finishes # from the dev server and prepares the update. chromeos_startup finishes
# the update on next boot. # the update on next boot.
function copy_stateful_update { function copy_stateful_update {
info "Starting stateful update." local dev_url=$(get_devserver_url)
local dev_dir="$(dirname $0)/../platform/dev" local stateful_url=""
# Assume users providing an update url are using an archive_dir path.
if [ -n "${FLAGS_update_url}" ]; then
stateful_url=$(echo ${dev_url} | sed -e "s/update/static\/archive/")
else
stateful_url=$(echo ${dev_url} | sed -e "s/update/static/")
fi
info "Starting stateful update using URL ${stateful_url}"
# Copy over update script and run update. # Copy over update script and run update.
remote_cp_to "$dev_dir/stateful_update" "/tmp" local dev_dir="$(dirname $0)/../platform/dev"
remote_sh "/tmp/stateful_update" remote_cp_to "${dev_dir}/stateful_update" "/tmp"
remote_sh "/tmp/stateful_update ${stateful_url}"
} }
function get_update_args { function get_update_args {