From b30d1bd4c665422165c912982e427fe5f8fe5ed9 Mon Sep 17 00:00:00 2001 From: crees Date: Sun, 3 Jul 2011 15:16:04 +0000 Subject: - Use USERS and GROUPS PR: ports/157592 Submitted by: Chris Rees Approved by: rene (mentor), maintainer timeout (29 days) --- games/pvpgn/Makefile | 3 +++ games/pvpgn/pkg-deinstall | 9 --------- games/pvpgn/pkg-install | 27 --------------------------- 3 files changed, 3 insertions(+), 36 deletions(-) (limited to 'games/pvpgn') 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 -- cgit