summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Bex <peter@more-magic.net>2016-04-02 21:18:24 +0200
committerPeter Bex <peter@more-magic.net>2016-04-02 21:18:24 +0200
commit4771c015187292a1cea5932faa195ac22cb1a6be (patch)
treedf806f8df7ae9d8c08db5fddfdad7fd6db2cadeb
parent6a67710fd14f156809521393b033bda09dfaa83e (diff)
downloadvps-builder-4771c015187292a1cea5932faa195ac22cb1a6be.tar.gz
Add locales for en_US, en_GB and nl_NL
Of course this is overrideable by changing the right asset files.
-rw-r--r--assets/default/locale2
-rw-r--r--assets/locale.gen8
-rw-r--r--vps-builder.scm7
3 files changed, 16 insertions, 1 deletions
diff --git a/assets/default/locale b/assets/default/locale
new file mode 100644
index 0000000..52e89a9
--- /dev/null
+++ b/assets/default/locale
@@ -0,0 +1,2 @@
+LANG="en_GB.UTF-8"
+LANGUAGE="en_GB:en"
diff --git a/assets/locale.gen b/assets/locale.gen
new file mode 100644
index 0000000..88ee805
--- /dev/null
+++ b/assets/locale.gen
@@ -0,0 +1,8 @@
+# This file lists locales that you wish to have built. You can find a list
+# of valid supported locales at /usr/share/i18n/SUPPORTED, and you can add
+# user defined locales to /usr/local/share/i18n/SUPPORTED. If you change
+# this file, you need to rerun locale-gen.
+
+en_GB.UTF-8 UTF-8
+en_US.UTF-8 UTF-8
+nl_NL.UTF-8 UTF-8
diff --git a/vps-builder.scm b/vps-builder.scm
index 49dfb11..da27135 100644
--- a/vps-builder.scm
+++ b/vps-builder.scm
@@ -201,7 +201,12 @@
(install-file root-dir "assets/network/cloudstack-guest-setup"
"/etc/dhcp/dhclient-exit-hooks.d" "root" "root" #o644)
- ;; Update timezone
+ ;; Update timezone and locale
+ (install-file root-dir "assets/locale.gen"
+ "/etc/locale.gen" "root" "root" #o644)
+ (run* (chroot ,root-dir "locale-gen"))
+ (install-file root-dir "assets/default/locale"
+ "/etc/default/locale" "root" "root" #o644)
(install-file root-dir "assets/timezone"
"/etc/timezone" "root" "root" #o644)
(run* (chroot ,root-dir "dpkg-reconfigure" "tzdata")))