vmoverlay: overlay on default checksum, not booted

This allows us to save one reboot if we want the overlay to happen on
the pending base checksum.

Closes: #829
Approved by: cgwalters
This commit is contained in:
Jonathan Lebon 2017-06-12 12:50:42 -04:00 committed by Atomic Bot
parent 4ee57a6dbd
commit 9907f9b283

View File

@ -53,14 +53,13 @@ set -x
# And then this code path in the VM
# get csum of current default deployment
commit=$(rpm-ostree status --json | \
python -c '
import sys, json;
deployments = json.load(sys.stdin)["deployments"]
for deployment in deployments:
if deployment["booted"]:
print deployment["checksum"]
exit()')
deployment = json.load(sys.stdin)["deployments"][0]
print deployment["checksum"]
exit()')
if [[ -z $commit ]] || ! ostree rev-parse $commit; then
echo "Error while determining current commit" >&2