Add locales configuration
authorHugo Villeneuve <hugo@hugovil.com>
Mon, 16 Jan 2023 21:58:41 +0000 (16:58 -0500)
committerHugo Villeneuve <hugo@hugovil.com>
Wed, 1 Mar 2023 17:10:15 +0000 (12:10 -0500)
recipes-core/base-files/base-files/locale.conf [new file with mode: 0644]
recipes-core/base-files/base-files/locale.sh [new file with mode: 0644]
recipes-core/base-files/base-files_%.bbappend

diff --git a/recipes-core/base-files/base-files/locale.conf b/recipes-core/base-files/base-files/locale.conf
new file mode 100644 (file)
index 0000000..b41408f
--- /dev/null
@@ -0,0 +1 @@
+LANG=en_CA.utf8
diff --git a/recipes-core/base-files/base-files/locale.sh b/recipes-core/base-files/base-files/locale.sh
new file mode 100644 (file)
index 0000000..786a86c
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# To have the date/time displayed in 24h format:
+export LC_TIME=C
index be6fd99..84276fe 100644 (file)
@@ -1,6 +1,20 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRC_URI:append = " \
+     file://locale.conf \
+     file://locale.sh \
+"
+
 do_install:append () {
     echo "hvmpd" > ${D}${sysconfdir}/hostname
 
     # Maybe make this machine-specific in the future...
     echo "${MACHINE} revA" > ${D}${sysconfdir}/hwrevision
+
+    # /etc/locale.conf is systemd-specific.
+    install -d ${D}${sysconfdir}
+    install -m 0644 ${WORKDIR}/locale.conf ${D}${sysconfdir}
+
+    install -d ${D}${sysconfdir}/profile.d
+    install -m 0644 locale.sh ${D}${sysconfdir}/profile.d/
 }