diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-09-05 23:02:56 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-09-05 23:02:56 +0000 |
commit | 0c77eeabed86bbe54662d435016d7290ffd74141 (patch) | |
tree | ba6bcfd2bdcb33e87e62c4a4f32a397211eda92c /perl-install/install_steps.pm | |
parent | 5798823e331c86fb3f97593b0cd2820224767d15 (diff) | |
download | drakx-0c77eeabed86bbe54662d435016d7290ffd74141.tar drakx-0c77eeabed86bbe54662d435016d7290ffd74141.tar.gz drakx-0c77eeabed86bbe54662d435016d7290ffd74141.tar.bz2 drakx-0c77eeabed86bbe54662d435016d7290ffd74141.tar.xz drakx-0c77eeabed86bbe54662d435016d7290ffd74141.zip |
no_comment
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r-- | perl-install/install_steps.pm | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index b9ffd80ee..6e8bff2e9 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -232,16 +232,10 @@ sub addUser($) { my $p = $o->{prefix}; my @passwd = cat_("$p/etc/passwd");; - !$u{name} || member($u{name}, map { (split ':')[0] } @passwd) and return; - - unless ($u{uid}) { - my @uids = map { (split ':')[2] } @passwd; - for ($u{uid} = 500; member($u{uid}, @uids); $u{uid}++) {} - } - unless ($u{gid}) { - my @gids = map { (split ':')[2] } cat_("$p/etc/group"); - for ($u{gid} = 500; member($u{gid}, @gids); $u{gid}++) {} - } + !$u{name} || getpwnam($u{name}) and return; + + for ($u{uid} = 500; getpwuid($u{uid}); $u{uid}++) {} + for ($u{gid} = 500; getgrgid($u{gid}); $u{gid}++) {} $u{home} ||= "/home/$u{name}"; $u{password} = crypt_($u{password}) if $u{password}; |