qubes-anaconda-addon: update templates post-processing code

There is qvm-template-postprocess tool for this now.

QubesOS/qubes-issues#2412
pull/12/merge
Marek Marczykowski-Górecki 7 years ago
parent a9724c8580
commit 1a527e5d05
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

@ -419,7 +419,8 @@ class QubesOsSpoke(FirstbootOnlySpokeMixIn, NormalSpoke):
# This is specific to firstboot, not general configuration.
for template in os.listdir('/var/lib/qubes/vm-templates'):
try:
self.configure_template(template)
self.configure_template(template,
'/var/lib/qubes/vm-templates/' + template)
except Exception as e:
errors.append((self.stage, str(e)))
@ -549,11 +550,9 @@ class QubesOsSpoke(FirstbootOnlySpokeMixIn, NormalSpoke):
self.run_command(['/usr/bin/qubes-prefs', '--force-root', 'clockvm', 'sys-net'])
self.run_command(['/usr/sbin/service', 'qubes-netvm', 'start'])
def configure_template(self, template):
def configure_template(self, template, path):
self.set_stage("Configuring TemplateVM {}".format(template))
self.run_command(['qvm-start', '--no-guid', template])
self.run_command(['su', '-c', 'qvm-sync-appmenus {}'.format(template), '-', self.qubes_user])
self.run_command(['qvm-shutdown', '--wait', template])
self.run_command(['qvm-template-postprocess', '--really', 'post-install', template, path])
def showErrorMessage(self, text):
self.thread_dialog.run_in_ui_thread(self.showErrorMessageHelper, text)

Loading…
Cancel
Save