dom0/pm-utils,dom0-update: sync clock using new qvm-sync-clock tool (#435)

This commit is contained in:
Marek Marczykowski 2012-02-01 17:08:07 +01:00
parent bb70eb270f
commit 59e7041554
2 changed files with 5 additions and 3 deletions

View File

@ -4,7 +4,9 @@
sync_qubes_vms_wallclock()
{
/usr/bin/qvm-sync-dom0-clock
# Try to sync clock from the network
/usr/bin/qvm-sync-clock && exit 0
# If failed - fallback to sync based on dom0 clock
DATE=$(date)
echo
echo "Syncing VMs clock to: $DATE"
@ -12,6 +14,6 @@ qvm-run --all --exclude=`qvm-get-clockvm` -u root "date -s \"$DATE\""
}
case "$1" in
thaw|resume) sync_qubes_vms_wallclock ;;
thaw|resume) sync_qubes_vms_wallclock & ;;
*) exit 0 ;;
esac

View File

@ -66,7 +66,7 @@ fi
# We should ensure the clocks in Dom0 and UpdateVM are in sync
# becuase otherwise yum might complain about future timestamps
qvm-sync-dom0-clock
qvm-sync-clock
echo "Checking for dom0 updates" >&2