tools: fire 'template-postinstall' event for extensions

Allow extensions to finish template setup. This include retrieving
appmenus, settings defaults etc.

QubesOS/qubes-issues#2412
This commit is contained in:
Marek Marczykowski-Górecki 2016-11-02 23:34:53 +01:00
parent 0041063b8e
commit e85b0663f6
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -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