From e85b0663f67f6d1cee424cca9e18c0766e8899cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 2 Nov 2016 23:34:53 +0100 Subject: [PATCH] tools: fire 'template-postinstall' event for extensions Allow extensions to finish template setup. This include retrieving appmenus, settings defaults etc. QubesOS/qubes-issues#2412 --- qubes/tools/qvm_template_postprocess.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qubes/tools/qvm_template_postprocess.py b/qubes/tools/qvm_template_postprocess.py index 1f2f9a01..f37889c7 100644 --- a/qubes/tools/qvm_template_postprocess.py +++ b/qubes/tools/qvm_template_postprocess.py @@ -121,8 +121,13 @@ def post_install(args): import_data(args.dir, vm) app.save() - # TODO: retrieve appmenus - + if not app.vmm.offline_mode: + # just created, so no need to save previous value - we know what it was + vm.netvm = None + vm.start(start_guid=False) + vm.fire_event('template-postinstall') + vm.shutdown(wait=True) + vm.netvm = qubes.property.DEFAULT return 0