summaryrefslogtreecommitdiffstats
path: root/perl-install/install/steps_interactive.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-08-13 20:14:13 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-08-13 20:14:13 +0000
commit95887b5a65aa7ebaf62b7ab663e085be0f154f39 (patch)
tree7b7aeb8f2618eb2c59e35c4ea0e27a4fab4303c1 /perl-install/install/steps_interactive.pm
parentb3dda2f9b09dc79f1dc25e4e74d5997e8a3af76b (diff)
downloaddrakx-95887b5a65aa7ebaf62b7ab663e085be0f154f39.tar
drakx-95887b5a65aa7ebaf62b7ab663e085be0f154f39.tar.gz
drakx-95887b5a65aa7ebaf62b7ab663e085be0f154f39.tar.bz2
drakx-95887b5a65aa7ebaf62b7ab663e085be0f154f39.tar.xz
drakx-95887b5a65aa7ebaf62b7ab663e085be0f154f39.zip
- adduserdrake, finish-install:
o create only one user o fix checking user info (#32517) - install: o merge root password step and create user step (new setRootPassword_addUser step name, but still handle addUser setRootPassword in interactiveSteps for auto_installs) o fix checking user creation info (#32517) o allow to create only one user per default, but add an entry in summary to create more users o authentication method is not configurable anymore for now. should we add it to summary?
Diffstat (limited to 'perl-install/install/steps_interactive.pm')
-rw-r--r--perl-install/install/steps_interactive.pm45
1 files changed, 18 insertions, 27 deletions
diff --git a/perl-install/install/steps_interactive.pm b/perl-install/install/steps_interactive.pm
index e40f19eb0..0d3146df9 100644
--- a/perl-install/install/steps_interactive.pm
+++ b/perl-install/install/steps_interactive.pm
@@ -784,6 +784,16 @@ sub summary {
push @l, {
group => N("System"),
+ label => N("User management"),
+ clicked => sub {
+ if (my $u = any::ask_user($o, $o->{users}, $o->{security}, needauser => 1)) {
+ any::add_users([$u], $o->{authentication});
+ }
+ },
+ };
+
+ push @l, {
+ group => N("System"),
label => N("Services"),
val => sub {
require services;
@@ -935,37 +945,18 @@ sub summary {
}
#------------------------------------------------------------------------------
-sub setRootPassword {
- my ($o, $clicked) = @_;
- my $sup = $o->{superuser} ||= {};
- $sup->{password2} ||= $sup->{password} ||= "";
-
- if ($o->{security} >= 1 || $clicked) {
- require authentication;
- authentication::ask_root_password_and_authentication($o, $o->{net}, $sup, $o->{authentication} ||= {}, $o->{meta_class}, $o->{security});
- }
- install::steps::setRootPassword($o);
-}
-
-#------------------------------------------------------------------------------
-#-addUser
+#-setRootPassword_addUser
#------------------------------------------------------------------------------
-sub addUser {
- my ($o, $clicked) = @_;
+sub setRootPassword_addUser {
+ my ($o) = @_;
$o->{users} ||= [];
- if ($o->{security} < 1) {
- push @{$o->{users}}, { password => 'mandrake', realname => 'default', icon => 'automagic' }
- if !member('mandrake', map { $_->{name} } @{$o->{users}});
- }
- if ($o->{security} >= 1 || $clicked) {
- my @suggested_names = @{$o->{users}} ? () : grep { !/^\./ && $_ ne 'lost+found' && -d "$::prefix/home/$_" } all("$::prefix/home");
- any::ask_users($o, $o->{users}, $o->{security}, \@suggested_names);
- }
- add2hash($o, any::get_autologin());
- any::autologin($o, $o);
- any::set_autologin($o->do_pkgs, $o->{autologin}, $o->{desktop}) if $::globetrotter;
+ my $sup = $o->{superuser} ||= {};
+ $sup->{password2} ||= $sup->{password} ||= "";
+
+ any::ask_user_and_root($o, $sup, $o->{users}, $o->{security});
+ install::steps::setRootPassword($o);
install::steps::addUser($o);
}