Merge remote-tracking branch 'qubesos/pr/29'

* qubesos/pr/29:
  removed unnecessary comparison with True and changed to sysctl instead of remove
  Fixed #1930: Delete autostart Symlink when deleting a VM
This commit is contained in:
Marek Marczykowski-Górecki 2016-04-28 09:38:48 +02:00
commit 62e68d52a3
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -1412,6 +1412,11 @@ class QubesVm(object):
e.get_error_code())
raise
if os.path.exists("/etc/systemd/system/multi-user.target.wants/qubes-vm@" + self.name + ".service"):
subprocess.call(["sudo", "systemctl", "-q", "disable","qubes-vm@" + self.name + ".service"])
if retcode != 0:
raise QubesException("Failed to delete autostart entry for VM")
self.storage.remove_from_disk()
def write_firewall_conf(self, conf):