From a501fa7cae2b93807496295945e6d3b51e5ccb3f Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Wed, 28 Oct 2020 14:59:35 +0100 Subject: [PATCH] libvirt-guests: Sync time for autostarted guests MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Setting SYNC_TIME=1 does not work on autostarted guests. See https://bugzilla.redhat.com/show_bug.cgi?id=1555398. Signed-off-by: Tim Wiederhake Reviewed-by: Daniel P. Berrangé --- tools/libvirt-guests.sh.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/libvirt-guests.sh.in b/tools/libvirt-guests.sh.in index d69df908d2..87f96af14d 100644 --- a/tools/libvirt-guests.sh.in +++ b/tools/libvirt-guests.sh.in @@ -206,9 +206,9 @@ start() { retval run_virsh "$uri" start $bypass "$name" \ >/dev/null && \ gettext "done"; echo - if "$sync_time"; then - run_virsh "$uri" domtime --sync "$name" >/dev/null - fi + fi + if "$sync_time"; then + run_virsh "$uri" domtime --sync "$name" >/dev/null fi fi done -- 2.47.2