소스 검색

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.
Marek Marczykowski-Górecki 10 년 전
부모
커밋
90c84be5fb
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      vm-systemd/qubes-sysinit.sh

+ 5 - 2
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