summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r--perl-install/install_steps.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 225a0d3c1..ccf47b4c5 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -299,8 +299,9 @@ sub addUser($) {
foreach (glob_("$p/home")) { my ($u, $g) = (stat($_))[4,5]; $uids{$u} = 1; $gids{$g} = 1; }
my @l = @{$o->{users} || []};
+ my %done;
foreach (@l) {
- next if !$_->{name} || getpwnam($_->{name});
+ next if !$_->{name} || getpwnam($_->{name}) || $done{$_->{name}};
my $u = $_->{uid} || ($_->{oldu} = (stat("$p$_->{home}"))[4]);
my $g = $_->{gid} || ($_->{oldg} = (stat("$p$_->{home}"))[5]);
@@ -311,6 +312,7 @@ sub addUser($) {
$_->{uid} = $u;
$_->{gid} = $g;
$_{pw} ||= $_->{password} && install_any::crypt($_->{password});
+ $done{$_->{name}} = 1;
}
my @passwd = cat_("$p/etc/passwd");;