Commit f28e07c9 authored by Łukasz Nowak's avatar Łukasz Nowak

TENTATIVE packer: Set default keyboard layout

We shall be able to select keyboards during starting the VM, instead of
hardcoding them.

TENTATIVE as I see that fr is enforced even with qemu 5+, which suppose to use
keyboard layout of the client.
parent 37393fe4
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"boot_command": [ "boot_command": [
"<esc><wait><wait><wait><wait>", "<esc><wait><wait><wait><wait>",
"auto preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-debian10.cfg ", "auto preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-debian10.cfg ",
"debian-installer=en_US.UTF-8 locale=en_US keymap=fr ", "debian-installer=en_US.UTF-8 locale=en_US ",
"netcfg/get_hostname={{ .Name }} ", "netcfg/get_hostname={{ .Name }} ",
"netcfg/get_domain={{ user `domain`}} ", "netcfg/get_domain={{ user `domain`}} ",
"fb=false debconf/frontend=noninteractive ", "fb=false debconf/frontend=noninteractive ",
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
"<esc><wait><wait>", "<esc><wait><wait>",
"install auto ", "install auto ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-debian8.cfg ", "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-debian8.cfg ",
"debian-installer=en_US locale=en_US keymap=fr ", "debian-installer=en_US locale=en_US ",
"netcfg/get_hostname={{ .Name }} ", "netcfg/get_hostname={{ .Name }} ",
"netcfg/get_domain={{ user `domain`}} ", "netcfg/get_domain={{ user `domain`}} ",
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
"<esc><wait><wait>", "<esc><wait><wait>",
"install auto ", "install auto ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-debian8.cfg ", "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-debian8.cfg ",
"debian-installer=en_US locale=en_US keymap=fr ", "debian-installer=en_US locale=en_US ",
"netcfg/get_hostname={{ .Name }} ", "netcfg/get_hostname={{ .Name }} ",
"netcfg/get_domain={{ user `domain`}} ", "netcfg/get_domain={{ user `domain`}} ",
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
"<esc><wait><wait>", "<esc><wait><wait>",
"install auto ", "install auto ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-debian9.cfg ", "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-debian9.cfg ",
"debian-installer=en_US locale=en_US keymap=fr ", "debian-installer=en_US locale=en_US ",
"netcfg/get_hostname={{ .Name }} ", "netcfg/get_hostname={{ .Name }} ",
"netcfg/get_domain={{ user `domain`}} ", "netcfg/get_domain={{ user `domain`}} ",
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
"<esc><wait><wait>", "<esc><wait><wait>",
"install auto ", "install auto ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-debian9.cfg ", "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-debian9.cfg ",
"debian-installer=en_US locale=en_US keymap=fr ", "debian-installer=en_US locale=en_US ",
"netcfg/get_hostname={{ .Name }} ", "netcfg/get_hostname={{ .Name }} ",
"netcfg/get_domain={{ user `domain`}} ", "netcfg/get_domain={{ user `domain`}} ",
......
...@@ -3,7 +3,7 @@ text ...@@ -3,7 +3,7 @@ text
reboot reboot
cdrom cdrom
lang en_US.UTF-8 lang en_US.UTF-8
keyboard fr keyboard en
timezone --utc Etc/UTC timezone --utc Etc/UTC
rootpw --plaintext slapos rootpw --plaintext slapos
user --name=slapos --groups=slapos --password=slapos --plaintext user --name=slapos --groups=slapos --password=slapos --plaintext
......
...@@ -3,7 +3,7 @@ text ...@@ -3,7 +3,7 @@ text
reboot reboot
url --mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os url --mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
lang en_US.UTF-8 lang en_US.UTF-8
keyboard fr keyboard en
timezone --utc Etc/UTC timezone --utc Etc/UTC
rootpw --plaintext slapos rootpw --plaintext slapos
user --name=slapos --groups=slapos --password=slapos --plaintext user --name=slapos --groups=slapos --password=slapos --plaintext
......
d-i debian-installer/locale string en_US d-i debian-installer/locale string en_US
d-i keyboard-configuration/xkb-keymap select fr d-i keyboard-configuration/xkb-keymap select en
d-i time/zone string Europe/Paris d-i time/zone string Europe/Paris
d-i clock-setup/utc boolean true d-i clock-setup/utc boolean true
d-i apt-setup/enable-source-repositories string false d-i apt-setup/enable-source-repositories string false
......
d-i debian-installer/locale string en_US d-i debian-installer/locale string en_US
d-i keyboard-configuration/xkb-keymap select fr d-i keyboard-configuration/xkb-keymap select en
d-i clock-setup/ntp boolean true d-i clock-setup/ntp boolean true
d-i clock-setup/utc boolean true d-i clock-setup/utc boolean true
d-i finish-install/reboot_in_progress note d-i finish-install/reboot_in_progress note
......
d-i debian-installer/locale string en_US d-i debian-installer/locale string en_US
d-i keyboard-configuration/xkb-keymap select fr d-i keyboard-configuration/xkb-keymap select en
d-i clock-setup/ntp boolean true d-i clock-setup/ntp boolean true
d-i clock-setup/utc boolean true d-i clock-setup/utc boolean true
d-i finish-install/reboot_in_progress note d-i finish-install/reboot_in_progress note
......
d-i debian-installer/locale string en_US d-i debian-installer/locale string en_US
d-i console-setup/ask_detect boolean false d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/xkb-keymap select fr d-i keyboard-configuration/xkb-keymap select en
choose-mirror-bin mirror/http/proxy string choose-mirror-bin mirror/http/proxy string
d-i debian-installer/framebuffer boolean false d-i debian-installer/framebuffer boolean false
d-i debconf/frontend select noninteractive d-i debconf/frontend select noninteractive
......
...@@ -5,7 +5,7 @@ d-i base-installer/kernel/override-image string linux-server ...@@ -5,7 +5,7 @@ d-i base-installer/kernel/override-image string linux-server
d-i debian-installer/locale string en_US d-i debian-installer/locale string en_US
d-i time/zone string CET d-i time/zone string CET
d-i keyboard-configuration/xkb-keymap select fr d-i keyboard-configuration/xkb-keymap select en
d-i partman-auto/method string regular d-i partman-auto/method string regular
d-i partman/choose_partition select finish d-i partman/choose_partition select finish
......
...@@ -32,6 +32,3 @@ rm -f /root/.bash_history ...@@ -32,6 +32,3 @@ rm -f /root/.bash_history
# Clean up log files # Clean up log files
find /var/log -type f | while read f; do echo -ne '' > $f; done; find /var/log -type f | while read f; do echo -ne '' > $f; done;
# Make sure keyboard language is french
sed -i 's#XKBLAYOUT=.*#XKBLAYOUT="fr"#' /etc/default/keyboard
# Update the box # Update the box
apt-get -y update apt-get -y update
apt-get -y upgrade apt-get -y upgrade
# Make sure keyboard language is french
sed -i 's#XKBLAYOUT=.*#XKBLAYOUT="fr"#' /etc/default/keyboard
...@@ -34,11 +34,11 @@ ...@@ -34,11 +34,11 @@
"boot_command": [ "boot_command": [
"<esc><esc><enter><wait>", "<esc><esc><enter><wait>",
"/install/vmlinuz url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-ubuntu.cfg ", "/install/vmlinuz url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-ubuntu.cfg ",
"debian-installer=en_US auto locale=en_US kbd-chooser/method=fr ", "debian-installer=en_US auto locale=en_US ",
"hostname={{ .Name }} ", "hostname={{ .Name }} ",
"keyboard-configuration/modelcode=pc101 ", "keyboard-configuration/modelcode=pc101 ",
"keyboard-configuration/layoutcode=fr ", "keyboard-configuration/layoutcode=en ",
"passwd/user-fullname={{user `user`}} ", "passwd/user-fullname={{user `user`}} ",
"passwd/user-password-again={{user `password`}} ", "passwd/user-password-again={{user `password`}} ",
......
...@@ -33,11 +33,11 @@ ...@@ -33,11 +33,11 @@
"boot_command": [ "boot_command": [
"<esc><esc><enter><wait>", "<esc><esc><enter><wait>",
"/install/vmlinuz url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-ubuntu.cfg ", "/install/vmlinuz url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-ubuntu.cfg ",
"debian-installer=en_US auto locale=en_US kbd-chooser/method=fr ", "debian-installer=en_US auto locale=en_US kbd-chooser/method=en ",
"hostname={{ .Name }} ", "hostname={{ .Name }} ",
"keyboard-configuration/modelcode=pc101 ", "keyboard-configuration/modelcode=pc101 ",
"keyboard-configuration/layoutcode=fr ", "keyboard-configuration/layoutcode=en ",
"passwd/user-fullname={{user `user`}} ", "passwd/user-fullname={{user `user`}} ",
"passwd/user-password-again={{user `password`}} ", "passwd/user-password-again={{user `password`}} ",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment