summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2001-11-26 20:06:04 +0000
committerJeremy Katz <katzj@redhat.com>2001-11-26 20:06:04 +0000
commit782a3a754429bec9c7a1d6fcaed71a545513ce88 (patch)
treec8c84984d27b5cc7b6be0f3f8aa2b81e30b738cc
parent0e2aec8d0edd022650b695f199a5d69e8950804c (diff)
downloadanaconda-782a3a754429bec9c7a1d6fcaed71a545513ce88.tar.gz
anaconda-782a3a754429bec9c7a1d6fcaed71a545513ce88.tar.xz
anaconda-782a3a754429bec9c7a1d6fcaed71a545513ce88.zip
re-enable setting the keyboard map for kickstart installs (#56379)
-rw-r--r--loader/kickstart.c1
-rw-r--r--loader/kickstart.h1
-rw-r--r--loader/lang.c15
-rw-r--r--loader/loader.c2
4 files changed, 12 insertions, 7 deletions
diff --git a/loader/kickstart.c b/loader/kickstart.c
index 919066588..e8e5e5a13 100644
--- a/loader/kickstart.c
+++ b/loader/kickstart.c
@@ -35,6 +35,7 @@ struct ksCommandNames ksTable[] = {
{ KS_CMD_XDISPLAY, "xdisplay" },
{ KS_CMD_DRIVERDISK, "driverdisk" },
{ KS_CMD_DEVICEPROBE, "deviceprobe" },
+ { KS_CMD_KEYBOARD, "keyboard" },
{ KS_CMD_NONE, NULL }
};
diff --git a/loader/kickstart.h b/loader/kickstart.h
index ca85e3479..856160fc1 100644
--- a/loader/kickstart.h
+++ b/loader/kickstart.h
@@ -11,6 +11,7 @@
#define KS_CMD_TEXT 8
#define KS_CMD_DRIVERDISK 9
#define KS_CMD_DEVICEPROBE 10
+#define KS_CMD_KEYBOARD 11
int ksReadCommands(char * cmdFile);
int ksGetCommand(int cmd, char ** last, int * argc, char *** argv);
diff --git a/loader/lang.c b/loader/lang.c
index 6ca35c694..a24e37275 100644
--- a/loader/lang.c
+++ b/loader/lang.c
@@ -22,6 +22,7 @@
#include "misc.h"
#include "windows.h"
#include "isys/gzlib/gzlib.h"
+#include "kickstart.h"
#define errorWindow(String) \
newtWinMessage(_("Error"), _("OK"), String, strerror (errno));
@@ -448,6 +449,8 @@ int chooseKeyboard(char ** keymap, char ** kbdtypep, int flags) {
int i;
char * defkbd = keymap ? *keymap : NULL;
char *lang;
+ int argc;
+ char **argv;
#ifdef __sparc__
#define KBDTYPE_SUN 0
@@ -477,7 +480,7 @@ int chooseKeyboard(char ** keymap, char ** kbdtypep, int flags) {
}
}
} else
-#endif
+#endif /* kickstart sparc crap */
{
char twelve = 12;
int fd;
@@ -494,7 +497,7 @@ int chooseKeyboard(char ** keymap, char ** kbdtypep, int flags) {
}
}
}
-#endif
+#endif /* sparc */
if (!languages) loadLanguageList(flags);
@@ -514,14 +517,14 @@ int chooseKeyboard(char ** keymap, char ** kbdtypep, int flags) {
strcmp(kbdEntry->lang, getenv("LANG")))
kbdEntry++;
if (kbdEntry->keyboard) defkbd = kbdEntry->keyboard;
-#endif
+#endif /* more sparc drain bamage */
}
if (!defkbd)
#ifdef __sparc__
if (kbdtype == KBDTYPE_SUN)
defkbd = "sunkeymap";
else
-#endif
+#endif /* sparc drain bamage */
defkbd = "us";
f = gunzip_open("/etc/keymaps.gz");
@@ -546,8 +549,7 @@ int chooseKeyboard(char ** keymap, char ** kbdtypep, int flags) {
return LOADER_ERROR;
}
-#if 0
- if (kickstart) {
+ if (FL_KICKSTART(flags)) {
if (!ksGetCommand(KS_CMD_KEYBOARD, NULL, &argc, &argv)) {
if (argc < 2) {
logMessage("no argument passed to keyboard "
@@ -572,7 +574,6 @@ int chooseKeyboard(char ** keymap, char ** kbdtypep, int flags) {
}
}
}
-#endif
if (num == -1 ) {
#ifdef __sparc__
diff --git a/loader/loader.c b/loader/loader.c
index 713ab03dc..50cd23046 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -1861,6 +1861,8 @@ static char * setupKickstart(char * location, struct knownDevices * kd,
}
}
+ chooseKeyboard(NULL, NULL, flags);
+
#ifdef INCLUDE_NETWORK
if (ksType == KS_CMD_NFS || ksType == KS_CMD_URL) {
startNewt(flags);