aboutsummaryrefslogtreecommitdiffstats
path: root/mail/dcc-dccd/pkg-install
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2004-11-21 10:35:46 +0800
committerpav <pav@FreeBSD.org>2004-11-21 10:35:46 +0800
commit36e3209e1139e965db234f8a11548221d6a8772a (patch)
tree93663f4d1407d1aa82ac15f59904cc385d009aa6 /mail/dcc-dccd/pkg-install
parent3e6d3d504cf20fc588644b07d613575c9ebdfc29 (diff)
downloadfreebsd-ports-gnome-36e3209e1139e965db234f8a11548221d6a8772a.tar.gz
freebsd-ports-gnome-36e3209e1139e965db234f8a11548221d6a8772a.tar.zst
freebsd-ports-gnome-36e3209e1139e965db234f8a11548221d6a8772a.zip
- Update to 1.2.58
- Correct detection of sendmail port - Don't delete config file if modified - Use special user for setuid programs PR: ports/74158 Submitted by: Dean Hollister <dean@odyssey.apana.org.au> (maintainer)
Diffstat (limited to 'mail/dcc-dccd/pkg-install')
-rw-r--r--mail/dcc-dccd/pkg-install36
1 files changed, 36 insertions, 0 deletions
diff --git a/mail/dcc-dccd/pkg-install b/mail/dcc-dccd/pkg-install
new file mode 100644
index 000000000000..b87b29ee9498
--- /dev/null
+++ b/mail/dcc-dccd/pkg-install
@@ -0,0 +1,36 @@
+#!/bin/sh
+# $FreeBSD$
+
+PREFIX=${PKG_PREFIX:-%%PREFIX%%}
+
+DCCUSER=%%DCCUSER%%
+DCCUID=%%DCCUID%%
+DCCGROUP=%%DCCGROUP%%
+DCCGID=%%DCCGID%%
+
+if [ "$2" = "PRE-INSTALL" ]; then
+
+ if ! pw groupshow "$DCCGROUP" 2>/dev/null 1>&2; then
+ if pw groupadd $DCCGROUP -g $DCCGID; then
+ echo "=> Added group \"$DCCGROUP\"."
+ else
+ echo "=> Adding group \"$DCCGROUP\" failed..."
+ exit 1
+ fi
+ fi
+
+ if ! pw usershow "$DCCUSER" 2>/dev/null 1>&2; then
+ if pw useradd $DCCUSER -u $DCCUID -g $DCCGROUP -h - \
+ -s "/sbin/nologin" -d "/nonexistent" \
+ -c "Distributed Checksum Clearinghouse"; \
+ then
+ echo "=> Added user \"$DCCUSER\"."
+ else
+ echo "=> Adding user \"$DCCUSER\" failed..."
+ exit 1
+ fi
+ fi
+
+fi
+
+exit 0