From 90c84be5fb1a272e11367b2fc95d51b4225bde1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 16 Jul 2014 04:15:21 +0200 Subject: [PATCH] systemd: do not reexec when not necessary Do not reexec systemd when running version is the same as installed binary. Apparently reexec causes some race condifions, which result in assertion fail in systemd. --- vm-systemd/qubes-sysinit.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vm-systemd/qubes-sysinit.sh b/vm-systemd/qubes-sysinit.sh index 23cf023..17d9fde 100755 --- a/vm-systemd/qubes-sysinit.sh +++ b/vm-systemd/qubes-sysinit.sh @@ -14,8 +14,11 @@ read_service() { $XS_READ qubes-service/$1 2> /dev/null } -# Ensure we're running right version of systemd (the one started by initrd may be different) -systemctl daemon-reexec +systemd_pkg_version=`systemctl --version|head -n 1` +if ! dmesg | grep -q "$systemd_pkg_version running in system mode."; then + # Ensure we're running right version of systemd (the one started by initrd may be different) + systemctl daemon-reexec +fi # Wait for evtchn initialization while [ ! -e /proc/xen/xenbus ]; do