Ver código fonte

core: fix setting the VM autostart (#925)

This is actually workaround for systemd bug reported here:
https://bugzilla.redhat.com/show_bug.cgi?id=1181922

Closes qubesos/qubes-issues#925
Marek Marczykowski-Górecki 9 anos atrás
pai
commit
9bfcb72722
1 arquivos alterados com 3 adições e 1 exclusões
  1. 3 1
      core-modules/000QubesVm.py

+ 3 - 1
core-modules/000QubesVm.py

@@ -607,7 +607,9 @@ class QubesVm(object):
     @autostart.setter
     def autostart(self, value):
         if value:
-            retcode = subprocess.call(["sudo", "systemctl", "enable", "qubes-vm@%s.service" % self.name])
+            retcode = subprocess.call(["sudo", "ln", "-sf",
+                                       "/usr/lib/systemd/system/qubes-vm@.service",
+                                       "/etc/systemd/system/multi-user.target.wants/qubes-vm@%s.service" % self.name])
         else:
             retcode = subprocess.call(["sudo", "systemctl", "disable", "qubes-vm@%s.service" % self.name])
         if retcode != 0: