mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-24 15:11:19 +02:00
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:
parent
6c6000b2c2
commit
d0a2e12511
@ -69,12 +69,22 @@ function start_dev_server {
|
||||
# from the dev server and prepares the update. chromeos_startup finishes
|
||||
# the update on next boot.
|
||||
function copy_stateful_update {
|
||||
info "Starting stateful update."
|
||||
local dev_dir="$(dirname $0)/../platform/dev"
|
||||
local dev_url=$(get_devserver_url)
|
||||
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.
|
||||
remote_cp_to "$dev_dir/stateful_update" "/tmp"
|
||||
remote_sh "/tmp/stateful_update"
|
||||
local dev_dir="$(dirname $0)/../platform/dev"
|
||||
remote_cp_to "${dev_dir}/stateful_update" "/tmp"
|
||||
remote_sh "/tmp/stateful_update ${stateful_url}"
|
||||
}
|
||||
|
||||
function get_update_args {
|
||||
|
Loading…
x
Reference in New Issue
Block a user