diff options
Diffstat (limited to 'mail/vpopmail/pkg-install')
-rw-r--r-- | mail/vpopmail/pkg-install | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mail/vpopmail/pkg-install b/mail/vpopmail/pkg-install index f3004e7de913..101602472771 100644 --- a/mail/vpopmail/pkg-install +++ b/mail/vpopmail/pkg-install @@ -8,10 +8,32 @@ %gids = ("vchkpw", 89); %uids = ('vpopmail', 89); +sub checkenv () { + my ($u, $g); + + # Users + foreach $u (keys %users) { + $var = uc($u)."_UID"; + if (defined($ENV{$var})) { + $uids{$u} = $ENV{$var}; + } + } + + # Groups + foreach $g (@groups) { + $var = uc($g)."_GID"; + if (defined($ENV{$var})) { + $gids{$g} = $ENV{$var}; + } + } +} + if ($ENV{PACKAGE_BUILDING} || $ARGV[1] eq "PRE-INSTALL") { $doguid=1; # Make sure we get the assigned guids. } +checkenv(); + foreach $group (@groups) { if (! getgrnam ($group)) { do checkrpw; # May exit |