summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2004-11-30 20:52:37 +0000
committerMystery Man <unknown@mandriva.org>2004-11-30 20:52:37 +0000
commit3b6c8c0a2d53dd42606b2d8bfb1f3add3b73e287 (patch)
treed8563cbf0708fb89633a0baa2e551501edd8a107 /perl-install/standalone
parent013de3b04fc467137a0fea07f0ca0f2e00fecc11 (diff)
downloaddrakx-backup-do-not-use-3b6c8c0a2d53dd42606b2d8bfb1f3add3b73e287.tar
drakx-backup-do-not-use-3b6c8c0a2d53dd42606b2d8bfb1f3add3b73e287.tar.gz
drakx-backup-do-not-use-3b6c8c0a2d53dd42606b2d8bfb1f3add3b73e287.tar.bz2
drakx-backup-do-not-use-3b6c8c0a2d53dd42606b2d8bfb1f3add3b73e287.tar.xz
drakx-backup-do-not-use-3b6c8c0a2d53dd42606b2d8bfb1f3add3b73e287.zip
This commit was manufactured by cvs2svn to create branch
'MDK-10_1-update'.
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/finish-install54
1 files changed, 54 insertions, 0 deletions
diff --git a/perl-install/standalone/finish-install b/perl-install/standalone/finish-install
new file mode 100755
index 000000000..352885b8b
--- /dev/null
+++ b/perl-install/standalone/finish-install
@@ -0,0 +1,54 @@
+#!/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() };
+eval { ask_authentication() };
+eval { ask_users() };
+
+$in->exit(0);