summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-09-13 06:29:44 +0000
committerMatt Wilson <msw@redhat.com>1999-09-13 06:29:44 +0000
commitbb20c21ac383238d139fbffeece06efd8ed5620b (patch)
treee252ac9cb57da771d144e4825410797918c683ad
parentf0c6f0eabd94c0c9935fdab940fa24c140299c12 (diff)
downloadanaconda-bb20c21ac383238d139fbffeece06efd8ed5620b.tar.gz
anaconda-bb20c21ac383238d139fbffeece06efd8ed5620b.tar.xz
anaconda-bb20c21ac383238d139fbffeece06efd8ed5620b.zip
more changes
-rwxr-xr-xanaconda20
-rw-r--r--loader/lang.c4
-rw-r--r--loader/lang.h2
-rw-r--r--loader/loader.c36
-rw-r--r--po/anaconda.pot22
5 files changed, 60 insertions, 24 deletions
diff --git a/anaconda b/anaconda
index f7751b423..fc314b430 100755
--- a/anaconda
+++ b/anaconda
@@ -18,8 +18,9 @@ gettext.textdomain("anaconda")
_ = gettext.gettext
(args, extra) = isys.getopt(sys.argv[1:], 'GTtdr:fm:',
- [ 'gui', 'text', 'test', 'debug', 'method=', 'rootpath=',
+ [ 'gui', 'text', 'test', 'debug', 'method=', 'rootpath=',
'testpath=', 'mountfs', 'traceonly', 'kickstart=',
+ 'lang=', 'keymap=', 'kbdtype=',
'expert'])
# remove the arguments - gnome_init doesn't understand them
@@ -40,6 +41,9 @@ mouseInfo = None
x = None
kickstart = None
expert = 0
+lang = None
+keymap = None
+kbdtpye = None
for n in args:
(str, arg) = n
@@ -65,6 +69,12 @@ for n in args:
traceOnly = 1
elif (str == '--expert'):
expert = 1
+ elif (str == '--lang'):
+ lang = arg
+ elif (str == '--keymap'):
+ keymap = arg
+ elif (str == '--kbdtype'):
+ kbdtype = arg
if (not method):
print "no install method specified"
@@ -184,6 +194,14 @@ if kickstart:
else:
instClass = CustomInstall()
+if lang
+ instClass.addToSkipList("language")
+ instClass.setLanguage(lang):
+
+if keymap and kbdtype:
+ instClass.addToSkipList("keyboard")
+ instClass.setKeyboard(keymap):
+
try:
todo = ToDo(intf, method, rootPath, installSystem = installPackages,
setupFilesystems = setupFilesystems, mouse = mouseInfo,
diff --git a/loader/lang.c b/loader/lang.c
index 15d725025..ba745db1a 100644
--- a/loader/lang.c
+++ b/loader/lang.c
@@ -213,7 +213,7 @@ static int loadFont(char * fontFile, int flags) {
return 0;
}
-int chooseLanguage(int flags) {
+int chooseLanguage(char ** lang, int flags) {
int choice = 0;
char ** langs;
int i;
@@ -246,6 +246,8 @@ int chooseLanguage(int flags) {
"during the installation process?"), 40, 5, 5, 8,
langs, &choice, _("OK"), NULL);
+ *lang = languages[choice].key;
+
if (choice == english) {
/* stick with the default (English) */
unsetenv("LANG");
diff --git a/loader/lang.h b/loader/lang.h
index bd0454cbe..ce5c6fd0d 100644
--- a/loader/lang.h
+++ b/loader/lang.h
@@ -4,7 +4,7 @@
#define _(x) translateString (x)
#define N_(foo) (foo)
-int chooseLanguage(int flags);
+int chooseLanguage(char ** lang, int flags);
int chooseKeyboard(char ** keymap, char ** kbdtypep, int flags);
char * translateString(char * str);
diff --git a/loader/loader.c b/loader/loader.c
index b9ee0b8bb..67d532160 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -957,10 +957,15 @@ static char * mountUrlImage(struct installMethod * method,
#endif
-static char * doMountImage(char * location, struct knownDevices * kd,
- moduleInfoSet modInfo,
- moduleList modLoaded,
- moduleDeps modDeps, int flags) {
+static char * doMountImage(char * location,
+ struct knownDevices * kd,
+ moduleInfoSet modInfo,
+ moduleList modLoaded,
+ moduleDeps modDeps,
+ char ** lang,
+ char ** keymap,
+ char ** kbdtype,
+ int flags) {
static int defaultMethod = 0;
int i, rc;
int validMethods[10];
@@ -971,8 +976,6 @@ static char * doMountImage(char * location, struct knownDevices * kd,
int localAvailable = 0;
void * class;
char * url = NULL;
- char * keymap = NULL;
- char * kbdtype = NULL;
enum { STEP_LANG, STEP_KBD, STEP_METHOD, STEP_URL, STEP_DONE } step;
if ((class = isysGetModuleList(modInfo, DRIVER_NET))) {
@@ -1039,12 +1042,12 @@ static char * doMountImage(char * location, struct knownDevices * kd,
while (step != STEP_DONE) {
switch (step) {
case STEP_LANG:
- chooseLanguage(flags);
+ chooseLanguage(lang, flags);
step = STEP_KBD;
break;
case STEP_KBD:
- rc = chooseKeyboard (&keymap, &kbdtype, flags);
+ rc = chooseKeyboard (keymap, kbdtype, flags);
if (rc == LOADER_BACK)
step = STEP_LANG;
@@ -1410,6 +1413,9 @@ int main(int argc, char ** argv) {
int i, rc;
int flags = 0;
int testing = 0;
+ char * lang = NULL;
+ char * keymap = NULL;
+ char * kbdtype = NULL;
struct knownDevices kd;
moduleInfoSet modInfo;
char * ksFile = NULL, * ksSource = NULL;
@@ -1518,8 +1524,9 @@ logMessage("Flags are 0x%x\n", flags);
}
if (!url) {
- url = doMountImage("/mnt/source", &kd, modInfo, modLoaded, modDeps,
- flags);
+ url = doMountImage("/mnt/source", &kd, modInfo, modLoaded, modDeps,
+ &lang, &keymap, &kbdtype,
+ flags);
}
if (!FL_TESTING(flags)) {
@@ -1613,6 +1620,15 @@ logMessage("Flags are 0x%x\n", flags);
*argptr++ = ksFile;
}
+ *argptr++ = "--lang";
+ *argptr++ = lang;
+
+ *argptr++ = "--keymap";
+ *argptr++ = keymap;
+
+ *argptr++ = "--kbdtype";
+ *argptr++ = kbdtype;
+
*argptr = NULL;
if (!FL_TESTING(flags)) {
diff --git a/po/anaconda.pot b/po/anaconda.pot
index e2aee9460..bac0009ae 100644
--- a/po/anaconda.pot
+++ b/po/anaconda.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 1999-09-13 01:32-0400\n"
+"POT-Creation-Date: 1999-09-13 01:35-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -535,45 +535,45 @@ msgstr ""
msgid "Account Configuration"
msgstr ""
-#: ../iw/account.py:122
+#: ../iw/account.py:121
msgid "Root Password: "
msgstr ""
-#: ../iw/account.py:125
+#: ../iw/account.py:124
msgid "Confirm: "
msgstr ""
-#: ../iw/account.py:176 ../iw/account.py:219
+#: ../iw/account.py:175 ../iw/account.py:218
msgid "Account Name"
msgstr ""
-#: ../iw/account.py:180
+#: ../iw/account.py:179
msgid "Password"
msgstr ""
-#: ../iw/account.py:184
+#: ../iw/account.py:183
msgid "Password (confirm)"
msgstr ""
-#: ../iw/account.py:188 ../iw/account.py:219
+#: ../iw/account.py:187 ../iw/account.py:218
msgid "Full Name"
msgstr ""
-#: ../iw/account.py:197 ../libfdisk/newtfsedit.c:1303
+#: ../iw/account.py:196 ../libfdisk/newtfsedit.c:1303
msgid "Add"
msgstr ""
-#: ../iw/account.py:199 ../libfdisk/newtfsedit.c:1296
+#: ../iw/account.py:198 ../libfdisk/newtfsedit.c:1296
#: ../libfdisk/newtfsedit.c:1304
msgid "Edit"
msgstr ""
-#: ../iw/account.py:201 ../libfdisk/newtfsedit.c:1296
+#: ../iw/account.py:200 ../libfdisk/newtfsedit.c:1296
#: ../libfdisk/newtfsedit.c:1304
msgid "Delete"
msgstr ""
-#: ../iw/account.py:203
+#: ../iw/account.py:202
msgid "New"
msgstr ""