diff options
author | krion <krion@FreeBSD.org> | 2009-01-07 15:08:24 +0800 |
---|---|---|
committer | krion <krion@FreeBSD.org> | 2009-01-07 15:08:24 +0800 |
commit | f7ce3159396d7e75dc39228f2d6ef82519ade56d (patch) | |
tree | b124f937de2ab57e44f813eb49b60978d60e2e24 /mail/exim | |
parent | dff1dc5b95bf3db1d00d7ce77f32a9544833b849 (diff) | |
download | freebsd-ports-gnome-f7ce3159396d7e75dc39228f2d6ef82519ade56d.tar.gz freebsd-ports-gnome-f7ce3159396d7e75dc39228f2d6ef82519ade56d.tar.zst freebsd-ports-gnome-f7ce3159396d7e75dc39228f2d6ef82519ade56d.zip |
Fix user/group creation order while installing package.
PR: ports/130184
Submitted by: Artis Caune <Artis.Caune@gmail.com>
Diffstat (limited to 'mail/exim')
-rw-r--r-- | mail/exim/pkg-install | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mail/exim/pkg-install b/mail/exim/pkg-install index 616ff41effd5..2665b5f04914 100644 --- a/mail/exim/pkg-install +++ b/mail/exim/pkg-install @@ -18,12 +18,12 @@ group=%%EXIM_GROUP%% logdir=%%LOGDIR%% if [ "$2" = "PRE-INSTALL" ]; then - if ! /usr/bin/id ${user} > /dev/null; then - /usr/sbin/pw useradd ${EXIM_USER} -g ${EXIM_GROUP} -u 125 \ - -h - -d /var/spool/exim -s /nonexistent -c "Exim User" + if ! /usr/sbin/pw groupshow ${group} >/dev/null; then + /usr/sbin/pw groupadd ${group} -g 125 fi - if ! /usr/bin/grep -q "^${group}:" /etc/group; then - /usr/sbin/pw groupadd ${EXIM_GROUP} -g 125 + if ! /usr/sbin/pw usershow ${user} >/dev/null; then + /usr/sbin/pw useradd ${user} -g ${group} -u 125 \ + -h - -d /var/spool/exim -s /nonexistent -c "Exim User" fi /bin/mkdir -p ${logdir} /usr/sbin/chown ${user}:${group} ${logdir} |