summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-11-05 22:54:25 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-11-05 22:54:25 +0000
commit680a22985ade4719c431cf2c43daed9eafd3bd4e (patch)
treebe13b6cba642cb168425d7de4a19ab934a111af1 /perl-install/install_steps.pm
parent4b3042e3c70ac231a17c33e0527bf3c2afc2d376 (diff)
downloaddrakx-backup-do-not-use-680a22985ade4719c431cf2c43daed9eafd3bd4e.tar
drakx-backup-do-not-use-680a22985ade4719c431cf2c43daed9eafd3bd4e.tar.gz
drakx-backup-do-not-use-680a22985ade4719c431cf2c43daed9eafd3bd4e.tar.bz2
drakx-backup-do-not-use-680a22985ade4719c431cf2c43daed9eafd3bd4e.tar.xz
drakx-backup-do-not-use-680a22985ade4719c431cf2c43daed9eafd3bd4e.zip
no_comment
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");;