firstboot copy Dom0 locale.conf to TemplateVMs

locale.conf is what makes an AppVM shows menus in the local language
instead of english.
This commit is contained in:
Victor Lopez 2014-09-01 11:04:07 +02:00 committed by Marek Marczykowski-Górecki
parent 89333bd683
commit 3ddefba9f1
2 changed files with 2 additions and 0 deletions

View File

@ -79,6 +79,7 @@ if [ "$vms_service" == "yes" ]; then
for template in `ls /var/lib/qubes/vm-templates`; do for template in `ls /var/lib/qubes/vm-templates`; do
/bin/mount -oloop "/var/lib/qubes/vm-templates/$template/root.img" /mnt/template-root /bin/mount -oloop "/var/lib/qubes/vm-templates/$template/root.img" /mnt/template-root
cp /etc/localtime /mnt/template-root/etc cp /etc/localtime /mnt/template-root/etc
cp /etc/locale.conf /mnt/template-root/etc
cp /etc/ntp.conf /mnt/template-root/etc cp /etc/ntp.conf /mnt/template-root/etc
umount /mnt/template-root umount /mnt/template-root
done done

View File

@ -216,6 +216,7 @@ class moduleClass(Module):
'/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'])
subprocess.check_call(['cp', '/etc/locale.conf', '/mnt/template-root/etc'])
subprocess.check_call(['cp', '/etc/ntp.conf', '/mnt/template-root/etc']) subprocess.check_call(['cp', '/etc/ntp.conf', '/mnt/template-root/etc'])
subprocess.check_call(['/bin/umount', '/mnt/template-root']) subprocess.check_call(['/bin/umount', '/mnt/template-root'])
subprocess.check_call(['/bin/rmdir', '/mnt/template-root']) subprocess.check_call(['/bin/rmdir', '/mnt/template-root'])