aboutsummaryrefslogtreecommitdiff
path: root/mail/simscan/files
diff options
context:
space:
mode:
authorChris Rees <crees@FreeBSD.org>2011-07-10 17:45:53 +0000
committerChris Rees <crees@FreeBSD.org>2011-07-10 17:45:53 +0000
commitf1e12f3aafd62d4936ded5400a48ac4c9d8fbb86 (patch)
treedd8f2967ef5901fa8caa237e7e95734ea3640460 /mail/simscan/files
parentacd4a94f863fdb61a59cbac2ffefd9570c8cbf4f (diff)
downloadports-f1e12f3aafd62d4936ded5400a48ac4c9d8fbb86.tar.gz
ports-f1e12f3aafd62d4936ded5400a48ac4c9d8fbb86.zip
Use USERS and GROUPS
PR: ports/157665 Submitted by: crees (me) Approved by: rene (mentor, implicit), maintainer timeout (lippe, 35 days)
Notes
Notes: svn path=/head/; revision=277475
Diffstat (limited to 'mail/simscan/files')
-rw-r--r--mail/simscan/files/pkg-deinstall.in19
-rw-r--r--mail/simscan/files/pkg-install.in33
2 files changed, 1 insertions, 51 deletions
diff --git a/mail/simscan/files/pkg-deinstall.in b/mail/simscan/files/pkg-deinstall.in
deleted file mode 100644
index 8f7467628f10..000000000000
--- a/mail/simscan/files/pkg-deinstall.in
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-
-USER=simscan
-GROUP=${USER}
-
-if [ x$2 != xDEINSTALL ]; then
- exit
-fi
-
-pw groupdel -n ${GROUP} || true
-pw userdel -n ${GROUP} || true
-
-rmdir %%QMAIL_PREFIX%%/%%SIMSCAN_DIR%% || true
-
-echo ""
-echo "If you're not updating this port, you can delete %%QMAIL_PREFIX%%/%%SIMSCAN_DIR%% directory"
-echo ""
diff --git a/mail/simscan/files/pkg-install.in b/mail/simscan/files/pkg-install.in
index 5ba5b6762674..b2307e0ed73c 100644
--- a/mail/simscan/files/pkg-install.in
+++ b/mail/simscan/files/pkg-install.in
@@ -4,40 +4,9 @@
USER=simscan
GROUP=${USER}
-UID=74
-GID=${UID}
SIMDIR=%%QMAIL_PREFIX%%/%%SIMSCAN_DIR%%
-if [ "$2" = "PRE-INSTALL" ]; then
-
-echo adding simscan user
-
- if pw group show "${GROUP}" 2>/dev/null; then
- echo "You already have a group \"${GROUP}\", so I will use it."
- else
- if pw groupadd ${GROUP} -g ${GID}; then
- echo "Added group \"${GROUP}\"."
- else
- echo "Adding group \"${GROUP}\" failed..."
- exit 1
- fi
- fi
-
-
- if pw user show "${USER}" 2>/dev/null; then
- echo "You already have a user \"${USER}\", so I will use it."
- else
- if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
- -d /nonexistent -s /sbin/nologin -c "Simscan User"
- then
- echo "Added user \"${USER}\"."
- else
- echo "Adding user \"${USER}\" failed..."
- exit 1
- fi
- fi
-
-elif [ "$2" = "POST-INSTALL" ]; then
+if [ "$2" = "POST-INSTALL" ]; then
if [ ! -d "$SIMDIR" ]; then
/bin/mkdir -p "$SIMDIR" || exit 1