qubes-anaconda-addon: update templates post-processing code
There is qvm-template-postprocess tool for this now. QubesOS/qubes-issues#2412
This commit is contained in:
parent
a9724c8580
commit
1a527e5d05
@ -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…
Reference in New Issue
Block a user