Allow manually update dom0 from GUI
This commit is contained in:
parent
d1d254fa18
commit
2777f7686b
@ -632,7 +632,7 @@ class VmManagerWindow(QMainWindow):
|
|||||||
self.action_shutdownvm.setEnabled(not vm.is_netvm() and vm.last_power_state and vm.qid != 0)
|
self.action_shutdownvm.setEnabled(not vm.is_netvm() and vm.last_power_state and vm.qid != 0)
|
||||||
self.action_appmenus.setEnabled(not vm.is_netvm())
|
self.action_appmenus.setEnabled(not vm.is_netvm())
|
||||||
self.action_editfwrules.setEnabled(vm.is_networked() and not (vm.is_netvm() and not vm.is_proxyvm()))
|
self.action_editfwrules.setEnabled(vm.is_networked() and not (vm.is_netvm() and not vm.is_proxyvm()))
|
||||||
self.action_updatevm.setEnabled(vm.is_updateable())
|
self.action_updatevm.setEnabled(vm.is_updateable() or vm.qid == 0)
|
||||||
|
|
||||||
def get_minimum_table_width(self):
|
def get_minimum_table_width(self):
|
||||||
tbl_W = 0
|
tbl_W = 0
|
||||||
@ -910,6 +910,7 @@ class VmManagerWindow(QMainWindow):
|
|||||||
app.processEvents()
|
app.processEvents()
|
||||||
time.sleep (0.2)
|
time.sleep (0.2)
|
||||||
|
|
||||||
|
if vm.qid != 0:
|
||||||
if thread_monitor.success:
|
if thread_monitor.success:
|
||||||
# gpk-update-viewer was started, don't know if user installs updates, but touch stat file anyway
|
# gpk-update-viewer was started, don't know if user installs updates, but touch stat file anyway
|
||||||
open(vm.dir_path + '/' + updates_stat_file, 'w').close()
|
open(vm.dir_path + '/' + updates_stat_file, 'w').close()
|
||||||
@ -918,6 +919,9 @@ class VmManagerWindow(QMainWindow):
|
|||||||
|
|
||||||
def do_update_vm(self, vm, thread_monitor):
|
def do_update_vm(self, vm, thread_monitor):
|
||||||
try:
|
try:
|
||||||
|
if vm.qid == 0:
|
||||||
|
subprocess.check_call (["/usr/bin/qvm-dom0-update", "--gui"])
|
||||||
|
else:
|
||||||
qubesutils.run_in_vm(vm, "user:gpk-update-viewer", verbose=False, autostart=True)
|
qubesutils.run_in_vm(vm, "user:gpk-update-viewer", verbose=False, autostart=True)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
thread_monitor.set_error_msg(str(ex))
|
thread_monitor.set_error_msg(str(ex))
|
||||||
|
Loading…
Reference in New Issue
Block a user