summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-06-03 00:12:46 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-06-03 00:12:46 +0000
commit15671b2f69979a1aa41a45fc5a4821bc194a4394 (patch)
tree96511142c8cace4ee5bd3e0f6bd8be46b8ec113f
parente1472e0f69e0b826a99fd30c2d38fa02691f8967 (diff)
downloaddrakx-15671b2f69979a1aa41a45fc5a4821bc194a4394.tar
drakx-15671b2f69979a1aa41a45fc5a4821bc194a4394.tar.gz
drakx-15671b2f69979a1aa41a45fc5a4821bc194a4394.tar.bz2
drakx-15671b2f69979a1aa41a45fc5a4821bc194a4394.tar.xz
drakx-15671b2f69979a1aa41a45fc5a4821bc194a4394.zip
add language selection to finish-install
-rwxr-xr-xperl-install/standalone/finish-install25
1 files changed, 22 insertions, 3 deletions
diff --git a/perl-install/standalone/finish-install b/perl-install/standalone/finish-install
index 57c303e0d..4798533ba 100755
--- a/perl-install/standalone/finish-install
+++ b/perl-install/standalone/finish-install
@@ -9,6 +9,7 @@ use authentication;
use network::netconnect;
use security::level;
+$ENV{SHARE_PATH} ||= "/usr/share";
my $authentication = authentication::get();
my $security = security::level::get();
network::netconnect::read_net_conf(my $netcnx = {}, my $netc = {}, my $intf = {});
@@ -16,6 +17,15 @@ network::netconnect::read_net_conf(my $netcnx = {}, my $netc = {}, my $intf = {}
$::isWizard = 1;
my $in = 'interactive'->vnew;
+sub ask_language() {
+ require lang;
+ my $locale = lang::read();
+ any::selectLanguage_and_more_standalone($in, $locale);
+ lang::write($locale);
+ lang::set($locale);
+ Gtk2->set_locale;
+}
+
sub ask_network() {
my $modules_conf = modules::any_conf->read;
modules::load_category($modules_conf, 'net');
@@ -47,11 +57,20 @@ sub ask_users() {
any::add_users($users, $authentication);
}
-eval { ask_network() };
+sub call {
+ my ($f_name) = @_;
+ log::l("calling $f_name");
+ my $f = $::{$f_name} or internal_error "bad function $f_name";
+ eval { $f->() };
+ log::l("$f_name failed: $@") if $@;
+}
+
+call('ask_language');
+call('ask_network');
$::WizardWindow->destroy; undef $::WizardWindow;
$::Wizard_pix_up = 'redhat-config-users';
-eval { ask_authentication() };
-eval { ask_users() };
+call('ask_authentication');
+call('ask_users');
setVarsInSh('/etc/sysconfig/finish-install', { FINISH_INSTALL => 'no' });
$in->exit(0);