aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorChris Rees <crees@FreeBSD.org>2011-07-03 15:16:04 +0000
committerChris Rees <crees@FreeBSD.org>2011-07-03 15:16:04 +0000
commit10f68deeb5da5afc12530402410f83b06789d9e9 (patch)
treec5341e21e4be13dcdc8ad0c5bd8d7e85b02e290b /games
parent501ee714ab5623e6333ac288c218b95f687e4501 (diff)
downloadports-10f68deeb5da5afc12530402410f83b06789d9e9.tar.gz
ports-10f68deeb5da5afc12530402410f83b06789d9e9.zip
Notes
Diffstat (limited to 'games')
-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