Hi,

These two patches adds support for keymap, consolefont and locale
variables to Arch, similarly to how it is done for Fedora.

Cheers,

Tom
From fae894dd8cca8ccf11504e5401a875d8d8242219 Mon Sep 17 00:00:00 2001
From: Tom Gundersen <t...@jklm.no>
Date: Sat, 18 Sep 2010 23:45:39 +0100
Subject: [PATCH 1/2] vconsole: set keyboard mapping and font settings on Arch

These variables are defined in /etc/rc.conf
---
 src/vconsole-setup.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/vconsole-setup.c b/src/vconsole-setup.c
index 0f730a0..06d9a21 100644
--- a/src/vconsole-setup.c
+++ b/src/vconsole-setup.c
@@ -199,6 +199,16 @@ int main(int argc, char **argv) {
                 free(vc_keymap);
                 vc_keymap = t;
         }
+#elif defined(TARGET_ARCH)
+        if ((r = parse_env_file("/etc/rc.conf", NEWLINE,
+				"KEYMAP", &vc_keymap,
+                                "CONSOLEFONT", &vc_font,
+                                "CONSOLEMAP", &vc_font_map,
+                                NULL)) < 0) {
+
+                if (r != -ENOENT)
+                        log_warning("Failed to read /etc/rc.conf: %s", strerror(-r));
+        }
 #endif
 
         /* Override distribution-specific options with the
-- 
1.7.2.3

From 50e88793490d2868929b84ec2ddee6728ca12b65 Mon Sep 17 00:00:00 2001
From: Tom Gundersen <t...@jklm.no>
Date: Sat, 18 Sep 2010 23:43:53 +0100
Subject: [PATCH 2/2] locale: set LANG on Arch

This variable is defined in /etc/rc.conf
---
 src/locale-setup.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/locale-setup.c b/src/locale-setup.c
index 923be04..675a739 100644
--- a/src/locale-setup.c
+++ b/src/locale-setup.c
@@ -76,6 +76,14 @@ int locale_setup(void) {
                 if (r != -ENOENT)
                         log_warning("Failed to read /etc/sysconfig/i18n: %s", strerror(-r));
         }
+#elif defined(TARGET_ARCH)
+	if ((r = parse_env_file("/etc/rc.conf", NEWLINE,
+				"LOCALE", &variables[VARIABLE_LANG],
+				NULL)) < 0) {
+
+		if (r != -ENOENT)
+			log_warning("Failed to read /etc/rc.conf: %s", strerror(-r));
+	}
 #endif
 
         /* Override distribution-specific options with the
-- 
1.7.2.3

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to