From 59e7041554b8695de7e54d97da353440999eac54 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Wed, 1 Feb 2012 17:08:07 +0100 Subject: [PATCH] dom0/pm-utils,dom0-update: sync clock using new qvm-sync-clock tool (#435) --- dom0/pm-utils/01qubes-sync-vms-clock | 6 ++++-- dom0/qvm-tools/qvm-dom0-update | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dom0/pm-utils/01qubes-sync-vms-clock b/dom0/pm-utils/01qubes-sync-vms-clock index 0980aced..6fe26dbf 100755 --- a/dom0/pm-utils/01qubes-sync-vms-clock +++ b/dom0/pm-utils/01qubes-sync-vms-clock @@ -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 diff --git a/dom0/qvm-tools/qvm-dom0-update b/dom0/qvm-tools/qvm-dom0-update index fdf30094..c23d555b 100755 --- a/dom0/qvm-tools/qvm-dom0-update +++ b/dom0/qvm-tools/qvm-dom0-update @@ -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