firstboot: configure all installed templates

This commit is contained in:
Marek Marczykowski 2012-07-20 13:02:19 +02:00 committed by Joanna Rutkowska
parent 6a7982b7e0
commit 0e94886611

View File

@ -197,8 +197,9 @@ class moduleClass(Module):
def do_configure_template(self): def do_configure_template(self):
subprocess.check_call(['/bin/mkdir', '-p', '/mnt/template-root']) subprocess.check_call(['/bin/mkdir', '-p', '/mnt/template-root'])
for template in os.listdir('/var/lib/qubes/vm-templates'):
subprocess.check_call(['/bin/mount', '-oloop', subprocess.check_call(['/bin/mount', '-oloop',
'/var/lib/qubes/vm-templates/fedora-15-x64/root.img', '/var/lib/qubes/vm-templates/%s/root.img' % template,
'/mnt/template-root']) '/mnt/template-root'])
# Copy timezone setting from Dom0 to template # Copy timezone setting from Dom0 to template
subprocess.check_call(['cp', '/etc/localtime', '/mnt/template-root/etc']) subprocess.check_call(['cp', '/etc/localtime', '/mnt/template-root/etc'])