summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-03-13 15:55:53 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-03-13 15:55:53 +0000
commitcfdb08690455c078ad71e3ab35cad2b40b60fe77 (patch)
tree425edfe9d9a9646760b3540d88c538cdfa70b774 /perl-install
parent57830b7a715067180aaabd7d731c99d714ae4f9c (diff)
downloaddrakx-cfdb08690455c078ad71e3ab35cad2b40b60fe77.tar
drakx-cfdb08690455c078ad71e3ab35cad2b40b60fe77.tar.gz
drakx-cfdb08690455c078ad71e3ab35cad2b40b60fe77.tar.bz2
drakx-cfdb08690455c078ad71e3ab35cad2b40b60fe77.tar.xz
drakx-cfdb08690455c078ad71e3ab35cad2b40b60fe77.zip
fix $users is now an array ref.
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/adduserdrake8
1 files changed, 4 insertions, 4 deletions
diff --git a/perl-install/standalone/adduserdrake b/perl-install/standalone/adduserdrake
index 537621083..b034f13d0 100755
--- a/perl-install/standalone/adduserdrake
+++ b/perl-install/standalone/adduserdrake
@@ -20,20 +20,20 @@ my $isMD5 = cat_("/etc/pam.d/passwd") =~ /md5/;
my $isShadow = cat_("/etc/pam.d/passwd") =~ /shadow/;
-my $users = {};
+my $users = [];
my $in;
if (my @l = grep { ! /^-/ } @ARGV) {
- $users->{$_} = { name => $_, realname => $_ } foreach @l;
+ $users = [ map { { name => $_, realname => $_ } } @l ];
} else {
$in = interactive->vnew('su');
any::ask_users('', $in, $users, $ENV{SECURE_LEVEL});
}
-system("adduser", $_) foreach keys %$users;
+system("adduser", $_->{name}) foreach @$users;
any::addUsers('', $users);
-any::write_passwd_user('', $_, $isMD5) foreach values %$users;
+any::write_passwd_user('', $_, $isMD5) foreach @$users;
system("pwconv") if $isShadow;
#$in->pkgs_install("autologin") if $o->{autologin};