summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-27 18:58:38 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-27 18:58:38 +0000
commitd3a1959233e05d213fa563a4e8671e4545268575 (patch)
tree7d8c618d320d65f88e56c3849fc5b3779b06a320
parent1dc7cb7c13d5f0a68dd01b44ee924567fbd6474f (diff)
downloaddrakx-backup-do-not-use-d3a1959233e05d213fa563a4e8671e4545268575.tar
drakx-backup-do-not-use-d3a1959233e05d213fa563a4e8671e4545268575.tar.gz
drakx-backup-do-not-use-d3a1959233e05d213fa563a4e8671e4545268575.tar.bz2
drakx-backup-do-not-use-d3a1959233e05d213fa563a4e8671e4545268575.tar.xz
drakx-backup-do-not-use-d3a1959233e05d213fa563a4e8671e4545268575.zip
extract set_authentication function
-rwxr-xr-xperl-install/standalone/finish-install24
1 files changed, 13 insertions, 11 deletions
diff --git a/perl-install/standalone/finish-install b/perl-install/standalone/finish-install
index 201ca674f..ecc334896 100755
--- a/perl-install/standalone/finish-install
+++ b/perl-install/standalone/finish-install
@@ -83,21 +83,23 @@ sub ask_network() {
$modules_conf->write;
}
+sub set_authentication {
+ my ($superuser) = @_;
+ authentication::set_root_passwd($superuser, $authentication);
+ my $ok = eval {
+ authentication::set($in, $net, $authentication) or return;
+ network::network::write_network_conf($net);
+ 1;
+ };
+ $in->ask_warn(N("Error"), formatError($@)) if $@;
+ return $ok;
+}
+
sub ask_authentication() {
my $meta_class = { getVarsFromSh("/etc/sysconfig/system") }->{META_CLASS};
-
my $superuser = {};
authentication::ask_root_password_and_authentication($in, $net, $superuser, $authentication, $meta_class, $security);
- authentication::set_root_passwd($superuser, $authentication);
-
- eval {
- authentication::set($in, $net, $authentication) or goto &ask_authentication;
- network::network::write_network_conf($net);
- };
- if (my $err = $@) {
- $in->ask_warn(N("Error"), formatError($err));
- goto &ask_authentication;
- }
+ set_authentication($superuser) or goto &ask_authentication;
}
#- USERS=with_root: asks both root and user accounts