diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-09-04 15:45:31 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-09-04 15:45:31 +0000 |
commit | 997cd903a80f4715c6dd6f621c1639bf2dc78a17 (patch) | |
tree | 4c3f319ef2f7a3baebe8a1de529503d812f1299b | |
parent | 6ca7d220f9116657035547e814bb039bc63cca2b (diff) | |
download | drakx-backup-do-not-use-997cd903a80f4715c6dd6f621c1639bf2dc78a17.tar drakx-backup-do-not-use-997cd903a80f4715c6dd6f621c1639bf2dc78a17.tar.gz drakx-backup-do-not-use-997cd903a80f4715c6dd6f621c1639bf2dc78a17.tar.bz2 drakx-backup-do-not-use-997cd903a80f4715c6dd6f621c1639bf2dc78a17.tar.xz drakx-backup-do-not-use-997cd903a80f4715c6dd6f621c1639bf2dc78a17.zip |
(addUser): fix calling with a user already existing (mainly for installs keeping the / non-formatted, special for pixel)
-rw-r--r-- | perl-install/install_steps.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 0159e1e3a..5f329bf12 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -722,8 +722,8 @@ sub addUser { foreach (@$users) { $_->{home} ||= "/home/$_->{name}"; - my $u = $_->{uid} || ($_->{oldu} = (stat("$p$_->{home}"))[4]); - my $g = $_->{gid} || ($_->{oldg} = (stat("$p$_->{home}"))[5]); + my $u = $_->{uid} || ($_->{oldu} = (stat("$p$_->{home}"))[4]) || int getpwnam($_->{name}); + my $g = $_->{gid} || ($_->{oldg} = (stat("$p$_->{home}"))[5]) || int getgrnam($_->{name}); #- search for available uid above 501 else initscripts may fail to change language for KDE. if (!$u || getpwuid($u)) { for ($u = 501; getpwuid($u) || $uids{$u}; $u++) {} } if (!$g) { for ($g = 501; getgrgid($g) || $gids{$g}; $g++) {} } |