From c142e20baa8a8e67d5a6703ba4458e09586d2868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 13 Feb 2018 03:02:21 +0100 Subject: [PATCH] Do not sync VM time with clockvm if it's set to network time sync When VM is set to synchronize the time with the network, to not sync its time with clockvm. Besides not having sense, in default configuration it will lead to loopback qrexec connection (sys-net -> sys-net), which will hang. QubesOS/qubes-issues#3333 --- Makefile | 3 ++- qubes-rpc/suspend-post-qvm-sync-clock.sh | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100755 qubes-rpc/suspend-post-qvm-sync-clock.sh diff --git a/Makefile b/Makefile index dcbe271..b1627d0 100644 --- a/Makefile +++ b/Makefile @@ -281,7 +281,8 @@ install-common: install-doc install -m 0644 qubes-rpc/suspend-pre.README $(DESTDIR)/etc/qubes/suspend-pre.d/README install -d $(DESTDIR)/etc/qubes/suspend-post.d install -m 0644 qubes-rpc/suspend-post.README $(DESTDIR)/etc/qubes/suspend-post.d/README - ln -s $(BINDIR)/qvm-sync-clock $(DESTDIR)/etc/qubes/suspend-post.d/qvm-sync-clock.sh + install -m 0755 qubes-rpc/suspend-post-qvm-sync-clock.sh \ + $(DESTDIR)/etc/qubes/suspend-post.d/qvm-sync-clock.sh install -d $(DESTDIR)/etc/qubes/post-install.d install -m 0644 post-install.d/README $(DESTDIR)/etc/qubes/post-install.d/ install -m 0755 post-install.d/*.sh $(DESTDIR)/etc/qubes/post-install.d/ diff --git a/qubes-rpc/suspend-post-qvm-sync-clock.sh b/qubes-rpc/suspend-post-qvm-sync-clock.sh new file mode 100755 index 0000000..432261d --- /dev/null +++ b/qubes-rpc/suspend-post-qvm-sync-clock.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +if [ ! -f /var/run/qubes-service/clocksync ]; then + /usr/bin/qvm-sync-clock +fi