summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakauth
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone/drakauth')
-rwxr-xr-xperl-install/standalone/drakauth33
1 files changed, 21 insertions, 12 deletions
diff --git a/perl-install/standalone/drakauth b/perl-install/standalone/drakauth
index 74f88cdb2..639d53adb 100755
--- a/perl-install/standalone/drakauth
+++ b/perl-install/standalone/drakauth
@@ -6,28 +6,37 @@ use standalone; #- warning, standalone must be loaded very first, for 'expla
use common;
use interactive;
-use any;
-use network;
+use authentication;
+use network::network;
-my $netc = {};
-my $intf = {};
-network::read_all_conf('', $netc, $intf);
+my $net = {};
+network::network::read_net_conf($net);
my $in = 'interactive'->vnew('su');
+my $authentication = authentication::get();
-my $authentication = {}; # TODO
-
-my $authentication_kind = any::authentication2authentication_kind($authentication);
+my $kind = authentication::to_kind($authentication);
+my $meta_class = { getVarsFromSh("/etc/sysconfig/system") }->{META_CLASS};
+my @kinds = authentication::kinds($in->do_pkgs, $meta_class);
main:
-$in->ask_from('', '',
+$in->ask_from(N("Authentication"), undef,
[
- { label => N("Authentication"), val => \$authentication_kind, list => [ any::authentication_kinds() ], format => \&any::authentication_kind2description },
+ { label => N("Authentication") },
+ { val => \$kind, type => 'list' , list => \@kinds, format => \&authentication::kind2description_raw },
]) or $in->exit;
-any::ask_authentification_parameters($in, $netc, $authentication, $authentication_kind) or goto main;
+authentication::ask_parameters($in, $net, $authentication, $kind) or goto main;
+
+eval {
+ authentication::set($in, $net, $authentication) or goto main;
+ network::network::write_network_conf($net); #- for NISDOMAIN
+};
+if (my $err = $@) {
+ $in->ask_warn(N("Error"), formatError($err));
+ goto main;
+}
-any::set_authentication($in, $netc, $authentication, sub { my ($f) = @_; $f->() });
$in->exit;