summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install_steps.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 2b6eb83fb..7e0d3f3f4 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -589,7 +589,7 @@ sub addUser {
my $g = $_->{gid} || ($_->{oldg} = (stat("$p$_->{home}"))[5]);
#- 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 || getgrgid($g)) { for ($g = 501; getgrgid($g) || $gids{$g}; $g++) {} }
+ if (!$g ) { for ($g = 501; getgrgid($g) || $gids{$g}; $g++) {} }
$_->{uid} = $u; $uids{$u} = 1;
$_->{gid} = $g; $gids{$g} = 1;
@@ -598,7 +598,7 @@ sub addUser {
any::write_passwd_user($p, $_, $o->{authentication}{md5}) foreach @$users;
open F, ">> $p/etc/group" or die "can't append to group file: $!";
- print F "$_->{name}:x:$_->{gid}:\n" foreach @$users;
+ print F "$_->{name}:x:$_->{gid}:\n" foreach grep { ! getgrgid($_->{gid}) } @$users;
foreach my $u (@$users) {
if (! -d "$p$u->{home}") {