Merge branch 'master' of git.qubes-os.org:/var/lib/qubes/git/marmarek/core
This commit is contained in:
commit
b9f6962716
@ -123,6 +123,7 @@ def main():
|
|||||||
files_to_backup += file_to_backup(vm.conf_file)
|
files_to_backup += file_to_backup(vm.conf_file)
|
||||||
if vm.is_updateable():
|
if vm.is_updateable():
|
||||||
files_to_backup += file_to_backup(vm.dir_path + "/apps")
|
files_to_backup += file_to_backup(vm.dir_path + "/apps")
|
||||||
|
files_to_backup += file_to_backup(vm.dir_path + "/kernels")
|
||||||
if os.path.exists (vm.firewall_conf):
|
if os.path.exists (vm.firewall_conf):
|
||||||
files_to_backup += file_to_backup(vm.firewall_conf)
|
files_to_backup += file_to_backup(vm.firewall_conf)
|
||||||
|
|
||||||
|
@ -57,6 +57,24 @@ def actually_execute(domid, cmd, options):
|
|||||||
args += ["-e"]
|
args += ["-e"]
|
||||||
subprocess.call(args)
|
subprocess.call(args)
|
||||||
|
|
||||||
|
def start_guid(vm, options):
|
||||||
|
if options.verbose:
|
||||||
|
print "--> Starting Qubes GUId..."
|
||||||
|
xid = vm.get_xid()
|
||||||
|
|
||||||
|
retcode = subprocess.call ([qubes_guid_path, "-d", str(xid), "-c", vm.label.color, "-i", vm.label.icon, "-l", str(vm.label.index)])
|
||||||
|
if (retcode != 0) :
|
||||||
|
print "ERROR: Cannot start qubes_guid!"
|
||||||
|
if options.tray:
|
||||||
|
tray_notify_error ("ERROR: Cannot start qubes_guid!")
|
||||||
|
exit (1)
|
||||||
|
|
||||||
|
if options.verbose:
|
||||||
|
print "--> Waiting for qubes-session..."
|
||||||
|
|
||||||
|
subprocess.call([qrexec_client_path, "-d", str(xid), "user:echo $$ >> /tmp/qubes-session-waiter; [ ! -f /tmp/qubes-session-env ] && exec sleep 365d"])
|
||||||
|
|
||||||
|
|
||||||
def vm_run_cmd(vm, cmd, options):
|
def vm_run_cmd(vm, cmd, options):
|
||||||
if options.shutdown:
|
if options.shutdown:
|
||||||
if options.verbose:
|
if options.verbose:
|
||||||
@ -103,27 +121,14 @@ def vm_run_cmd(vm, cmd, options):
|
|||||||
exit (1)
|
exit (1)
|
||||||
|
|
||||||
if os.getenv("DISPLAY") is not None:
|
if os.getenv("DISPLAY") is not None:
|
||||||
if options.verbose:
|
start_guid(vm, options)
|
||||||
print "--> Starting Qubes GUId..."
|
|
||||||
|
|
||||||
retcode = subprocess.call ([qubes_guid_path, "-d", str(xid), "-c", vm.label.color, "-i", vm.label.icon, "-l", str(vm.label.index)])
|
|
||||||
if (retcode != 0) :
|
|
||||||
print "ERROR: Cannot start qubes_guid!"
|
|
||||||
if options.tray:
|
|
||||||
tray_notify_error ("ERROR: Cannot start qubes_guid!")
|
|
||||||
exit (1)
|
|
||||||
|
|
||||||
actually_execute(str(xid), cmd, options);
|
actually_execute(str(xid), cmd, options);
|
||||||
|
|
||||||
else: # VM already running...
|
else: # VM already running...
|
||||||
xid = vm.get_xid()
|
xid = vm.get_xid()
|
||||||
if os.getenv("DISPLAY") is not None and not os.path.isfile("/var/run/qubes/guid_running.{0}".format(xid)):
|
if os.getenv("DISPLAY") is not None and not os.path.isfile("/var/run/qubes/guid_running.{0}".format(xid)):
|
||||||
retcode = subprocess.call ([qubes_guid_path, "-d", str(xid), "-c", vm.label.color, "-i", vm.label.icon, "-l", str(vm.label.index)])
|
start_guid(vm, options)
|
||||||
if (retcode != 0) :
|
|
||||||
print "ERROR: Cannot start qubes_guid!"
|
|
||||||
if options.tray:
|
|
||||||
tray_notify_error ("ERROR: Cannot start the GUI daemon for this VM!")
|
|
||||||
exit (1)
|
|
||||||
actually_execute(str(xid), cmd, options);
|
actually_execute(str(xid), cmd, options);
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
Loading…
Reference in New Issue
Block a user