rpm-ostree/vagrant/commit_and_deploy.sh
Jonathan Lebon 4877887e49 vagrant: use sync after deploying
For some reason, the VM would sometimes take a very long time to reboot
after deploying the new commit. Adding a sync before rebooting fixes
this, though I'm not sure why the filesystem doesn't sync itself as fast
without it.

Closes: #371
Approved by: cgwalters
2016-07-05 15:26:45 +00:00

18 lines
299 B
Bash

#!/bin/bash
set -euo pipefail
cd /ostree/repo/tmp
umount vmcheck.ro
cmd="ostree commit -b vmcheck -s '' \
--tree=dir=vmcheck \
--link-checkout-speedup"
if [ -n "${VERSION:-}" ]; then
cmd="$cmd --add-metadata-string=version=$VERSION"
fi
eval $cmd
ostree admin deploy vmcheck
sync