vagrant: use new 'booted' key to get current csum

Closes: #360
Approved by: cgwalters
This commit is contained in:
Jonathan Lebon 2016-06-28 16:31:26 -04:00 committed by Atomic Bot
parent 4fc6dd8b97
commit 0974a22834

View File

@ -5,7 +5,11 @@ set -euo pipefail
commit=$(rpm-ostree status --json | \ commit=$(rpm-ostree status --json | \
python -c ' python -c '
import sys, json; import sys, json;
print json.load(sys.stdin)["deployments"][0]["checksum"]') deployments = json.load(sys.stdin)["deployments"]
for deployment in deployments:
if deployment["booted"]:
print deployment["checksum"]
exit()')
if [[ -z $commit ]] || ! ostree rev-parse $commit; then if [[ -z $commit ]] || ! ostree rev-parse $commit; then
echo "Error while determining current commit" >&2 echo "Error while determining current commit" >&2