summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-07-08 05:04:23 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-07-08 05:04:23 +0000
commitc5b9c52a2e49c0d109d72b87c8adda657cf5ee1a (patch)
tree9de6f70d327f6cb9227b84f65740d8f09a3abf4f /perl-install/any.pm
parent5bf5886d579f214ac0c7d8d6f301c56cfb9d3651 (diff)
downloaddrakx-backup-do-not-use-c5b9c52a2e49c0d109d72b87c8adda657cf5ee1a.tar
drakx-backup-do-not-use-c5b9c52a2e49c0d109d72b87c8adda657cf5ee1a.tar.gz
drakx-backup-do-not-use-c5b9c52a2e49c0d109d72b87c8adda657cf5ee1a.tar.bz2
drakx-backup-do-not-use-c5b9c52a2e49c0d109d72b87c8adda657cf5ee1a.tar.xz
drakx-backup-do-not-use-c5b9c52a2e49c0d109d72b87c8adda657cf5ee1a.zip
when adding users during install, suggest the user names found in /home
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 67d540631..f49318924 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -495,7 +495,7 @@ sub inspect {
}
sub ask_user_one {
- my ($in, $users, $security, %options) = @_;
+ my ($in, $users, $security, $u, %options) = @_;
my @icons = facesnames();
@@ -508,7 +508,6 @@ sub ask_user_one {
ctools => N("access to compilation tools"),
);
- my $u;
$u->{password2} ||= $u->{password} ||= '';
$u->{shell} ||= '/bin/bash';
my $names = @$users ? N("(already added %s)", join(", ", map { $_->{realname} || $_->{name} } @$users)) : '';
@@ -563,10 +562,12 @@ sub ask_user_one {
}
sub ask_users {
- my ($in, $users, $security) = @_;
+ my ($in, $users, $security, $suggested_names) = @_;
while (1) {
- ask_user_one($in, $users, $security) and return;
+ my $u = {};
+ $u->{name} = shift @$suggested_names;
+ ask_user_one($in, $users, $security, $u) and return;
}
}