Start qrexec daemon when VM is running (but qrexec not)

This takes place ex. when VM started from qubes-manager.
There is little sense in implementing full start procedure in every qubes tool,
so start it here, not in qubes-manager.
This commit is contained in:
Marek Marczykowski 2011-04-01 01:23:57 +02:00
parent f0716c2498
commit 97403a8e45

View File

@ -133,6 +133,15 @@ def vm_run_cmd(vm, cmd, options):
if options.tray:
tray_notify_error ("ERROR: Cannot start the GUI daemon for this VM!")
exit (1)
if not os.path.exists("/var/run/qubes/qrexec.{0}".format(xid)):
retcode = subprocess.call ([qrexec_daemon_path, str(xid)])
if (retcode != 0) :
print "ERROR: Cannot start qrexec!"
if options.tray:
tray_notify_error ("ERROR: Cannot start the QRexec daemon for this VM!")
exit (1)
actually_execute(str(xid), cmd, options);
def main():