aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcrees <crees@FreeBSD.org>2011-07-03 23:16:04 +0800
committercrees <crees@FreeBSD.org>2011-07-03 23:16:04 +0800
commitb30d1bd4c665422165c912982e427fe5f8fe5ed9 (patch)
treeafb796cd374e1951a91cd87f90afaca1823b931e
parentfff4fd2a6d9551fa08619aa503770f282de762ef (diff)
downloadfreebsd-ports-gnome-b30d1bd4c665422165c912982e427fe5f8fe5ed9.tar.gz
freebsd-ports-gnome-b30d1bd4c665422165c912982e427fe5f8fe5ed9.tar.zst
freebsd-ports-gnome-b30d1bd4c665422165c912982e427fe5f8fe5ed9.zip
- Use USERS and GROUPS
PR: ports/157592 Submitted by: Chris Rees <utisoft@gmail.com> Approved by: rene (mentor), maintainer timeout (29 days)
-rw-r--r--games/pvpgn/Makefile3
-rw-r--r--games/pvpgn/pkg-deinstall9
-rw-r--r--games/pvpgn/pkg-install27
3 files changed, 3 insertions, 36 deletions
diff --git a/games/pvpgn/Makefile b/games/pvpgn/Makefile
index d523c47bd310..308c23b25046 100644
--- a/games/pvpgn/Makefile
+++ b/games/pvpgn/Makefile
@@ -23,6 +23,9 @@ USE_BZIP2= yes
USE_GMAKE= yes
SED_SCRIPT= -e 's|%%PREFIX%%|${PREFIX}|g'
+USERS= bnetd
+GROUPS= ${USERS}
+
RC_DIR= ${PREFIX}/etc/rc.d
RC_SUFX= .sh
SED_SCRIPT+= -e 's|%%RC_DIR%%|${RC_DIR}|g' \
diff --git a/games/pvpgn/pkg-deinstall b/games/pvpgn/pkg-deinstall
index da65a3cdab8f..1921a3463b21 100644
--- a/games/pvpgn/pkg-deinstall
+++ b/games/pvpgn/pkg-deinstall
@@ -4,18 +4,9 @@ if [ "$2" != "POST-DEINSTALL" ]; then
exit 0
fi
-USER=bnetd
LOGDIR=/var/log/pvpgn
PIDDIR=/var/run/pvpgn
-if pw usershow "${USER}" 2>/dev/null 1>&2; then
- echo "To delete PvPGN user permanently, use 'pw userdel ${USER}'"
-fi
-
-if pw groupshow "${USER}" 2>/dev/null 1>&2; then
- echo "To delete PvPGN group permanently, use 'pw groupdel ${USER}'"
-fi
-
rm -Rf ${PIDDIR}
echo "If you wish to delete pvpgn data and log files, "
diff --git a/games/pvpgn/pkg-install b/games/pvpgn/pkg-install
index bf224c91c38c..7c93359bfc3f 100644
--- a/games/pvpgn/pkg-install
+++ b/games/pvpgn/pkg-install
@@ -6,38 +6,11 @@ case $2 in
POST-INSTALL)
USER=bnetd
GROUP=${USER}
- UID=700
- GID=${UID}
- HOME_DIR=/nonexistent
LOGDIR=/var/log/pvpgn
PIDDIR=/var/run/pvpgn
PKGNAME=$1
PVPGN_CONFDIR=${PKG_PREFIX:-/usr/local}/etc/pvpgn
- 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 ${HOME_DIR} -s /sbin/nologin -c "Bnetd user"
- then
- echo "Added user \"${USER}\"."
- else
- echo "Adding user \"${USER}\" failed..."
- exit 1
- fi
- fi
-
mkdir -p %%PVPGN_DIR%%/bak/charinfo
mkdir -p %%PVPGN_DIR%%/bak/charsave
mkdir -p %%PVPGN_DIR%%/bnmail