aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2008-05-29 16:51:43 -0400
committerBill Nottingham <notting@redhat.com>2008-06-19 11:10:00 -0400
commit2b28cd1ba79cfaf0d9dca0c060a0f5be7a0b72b9 (patch)
treef38f58f6a4a8798211a48628c8c0f42f03a5ee22
parent48d6db4ca81edea0ffb1795a64e5153b34cdce63 (diff)
downloadinitscripts-2b28cd1ba79cfaf0d9dca0c060a0f5be7a0b72b9.tar
initscripts-2b28cd1ba79cfaf0d9dca0c060a0f5be7a0b72b9.tar.gz
initscripts-2b28cd1ba79cfaf0d9dca0c060a0f5be7a0b72b9.tar.bz2
initscripts-2b28cd1ba79cfaf0d9dca0c060a0f5be7a0b72b9.tar.xz
initscripts-2b28cd1ba79cfaf0d9dca0c060a0f5be7a0b72b9.zip
Support SYSFONTACM correctly, and support UNIMAP (#448704, <vvv+fedora@colocall.net>)
-rw-r--r--src/console_init.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/console_init.c b/src/console_init.c
index ddab86c8..bef14a63 100644
--- a/src/console_init.c
+++ b/src/console_init.c
@@ -33,6 +33,7 @@
static char *lang = NULL;
static char *font = NULL;
static char *acm = NULL;
+static char *unimap = NULL;
static char *keymap = NULL;
static int linux_console(int fd) {
@@ -52,6 +53,7 @@ static int configured_as_utf8() {
lang = svGetValue(i18nfile, "LANG");
font = svGetValue(i18nfile, "SYSFONT");
acm = svGetValue(i18nfile, "SYSFONTACM");
+ unimap = svGetValue(i18nfile, "UNIMAP");
svCloseFile(i18nfile);
if (!lang)
return 1;
@@ -84,18 +86,22 @@ static int read_keymap() {
return 0;
}
-static void set_font(int fd) {
+static void set_font(char *device) {
int pid, status;
if ( (pid = fork()) == 0) {
- char *args[] = { "setfont", "latarcyrheb-sun16", NULL, NULL, NULL };
+ char *args[] = { "setfont", "latarcyrheb-sun16", "-m", "none",
+ "-u", "none", "-C", NULL, NULL };
if (font)
args[1] = font;
if (acm) {
- args[2] = "-u";
args[3] = acm;
}
+ if (unimap) {
+ args[5] = unimap;
+ }
+ args[7] = device;
execv("/bin/setfont", args);
exit(1);
}
@@ -150,7 +156,7 @@ int main(int argc, char **argv) {
set_keyboard(dev, utf8);
set_terminal(dev, utf8);
- set_font(dev);
+ set_font(device);
read_keymap();
if (keymap)
set_keymap(dev,utf8);