1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
#!/usr/bin/perl
use lib qw(/usr/lib/libDrakX);
use common;
use interactive;
use any;
use authentication;
use network::netconnect;
use security::level;
my $authentication = authentication::get();
my $security = security::level::get();
network::netconnect::read_net_conf(my $netcnx = {}, my $netc = {}, my $intf = {});
$::isWizard = 1;
my $in = 'interactive'->vnew;
sub ask_network() {
my $modules_conf = modules::any_conf->read;
modules::load_category($modules_conf, 'net');
require network::netconnect;
network::netconnect::real_main('', $netcnx, $in, $modules_conf, $netc, undef, $intf);
}
sub ask_authentication() {
my $meta_class = { getVarsFromSh("/etc/sysconfig/system") }->{META_CLASS};
my $superuser = {};
authentication::ask_root_password_and_authentication($in, $netc, $superuser, $authentication, $meta_class, $security);
authentication::set_root_passwd($superuser, $authentication);
eval {
authentication::set($in, $netc, $authentication);
network::network::write_conf($netc);
};
if (my $err = $@) {
$in->ask_warn(N("Error"), formatError($err));
goto &ask_authentication;
}
}
sub ask_users() {
my $users = [];
any::ask_users($in, $users, $security, []);
any::add_users($users, $authentication);
}
eval { ask_network() };
$::WizardWindow->destroy; undef $::WizardWindow;
$::Wizard_pix_up = 'redhat-config-users';
eval { ask_authentication() };
eval { ask_users() };
setVarsInSh('/etc/sysconfig/finish-install', { FINISH_INSTALL => 'no' });
$in->exit(0);
|