diff options
author | crees <crees@FreeBSD.org> | 2011-07-08 02:14:36 +0800 |
---|---|---|
committer | crees <crees@FreeBSD.org> | 2011-07-08 02:14:36 +0800 |
commit | 8bf2ffb7a2676aedeeca60861a426a3b75b4db98 (patch) | |
tree | 7e064d5926858c1edf621adcb5f7b7c540050d07 | |
parent | 3f3e189d7538985bc224b51ea7367469ca10127e (diff) | |
download | freebsd-ports-gnome-8bf2ffb7a2676aedeeca60861a426a3b75b4db98.tar.gz freebsd-ports-gnome-8bf2ffb7a2676aedeeca60861a426a3b75b4db98.tar.zst freebsd-ports-gnome-8bf2ffb7a2676aedeeca60861a426a3b75b4db98.zip |
audio/ventrilo-server now uses USERS and GROUPS
PR: ports/157928
Submitted by: crees (me)
Approved by: rene (mentor, implicit), maintainer timeout (20 days)
-rw-r--r-- | GIDs | 1 | ||||
-rw-r--r-- | UIDs | 1 | ||||
-rw-r--r-- | audio/ventrilo-server/Makefile | 8 | ||||
-rw-r--r-- | audio/ventrilo-server/pkg-install | 67 |
4 files changed, 4 insertions, 73 deletions
@@ -77,6 +77,7 @@ ladvd:*:142: dovecot:*:143: dovenull:*:144: webcamd:*:145: +ventrilo:*:146: rbldns:*:153: sfs:*:171: agk:*:172: @@ -85,6 +85,7 @@ ladvd:*:142:142::0:0:Ladvd User:/var/empty:/usr/sbin/nologin dovecot:*:143:143::0:0:Dovecot User:/var/empty:/usr/sbin/nologin dovenull:*:144:144::0:0:Dovecot login User:/var/empty:/usr/sbin/nologin webcamd:*:145:145::0:0:Webcamd user:/var/empty:/usr/sbin/nologin +ventrilo:*:146:146::0:0:& server:/usr/local/ventrilo-server:/usr/sbin/nologin rbldns:*:153:153::0:0:rbldnsd pseudo-user:/nonexistent:/usr/sbin/nologin sfs:*:171:171::0:0:Self-Certifying File System:/nonexistent:/usr/sbin/nologin agk:*:172:172::0:0:AquaGateKeeper:/nonexistent:/nonexistent diff --git a/audio/ventrilo-server/Makefile b/audio/ventrilo-server/Makefile index d671ce37720c..c4d5d39dc3dc 100644 --- a/audio/ventrilo-server/Makefile +++ b/audio/ventrilo-server/Makefile @@ -27,6 +27,8 @@ RESTRICTED= Redistribution of pre-compiled binaries is not permitted INSTALL_DIR= ${PREFIX}/ventrilo-server USE_RC_SUBR= ${PORTNAME}${PKGNAMESUFFIX}.sh VENT_USER= ${PORTNAME} +USERS= ${VENT_USER} +GROUPS= ${USERS} WRKSRC= ${WRKDIR}/ventsrv SUB_FILES= pkg-message @@ -35,8 +37,6 @@ IGNORE= distfile can only be fetched if you accept the license. Go to http://www .endif do-install: - @ ${SETENV} PKG_PREFIX=${PREFIX} \ - ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL @${MKDIR} ${INSTALL_DIR} @${CHOWN} ${VENT_USER} ${INSTALL_DIR} ${INSTALL_PROGRAM} ${WRKSRC}/ventrilo_srv ${INSTALL_DIR} @@ -54,10 +54,6 @@ do-install: post-install: @${CAT} ${PKGMESSAGE} -post-deinstall: - @ ${SETENV} PKG_PREFIX=${PREFIX} \ - ${SH} ${PKGDEINSTALL} ${PORTNAME} POST-DEINSTALL - PKGDEINSTALL= ${PKGINSTALL} .include <bsd.port.post.mk> diff --git a/audio/ventrilo-server/pkg-install b/audio/ventrilo-server/pkg-install deleted file mode 100644 index e4ae65b108d2..000000000000 --- a/audio/ventrilo-server/pkg-install +++ /dev/null @@ -1,67 +0,0 @@ -#! /bin/sh - -PATH=/bin:/usr/sbin -HOMEDIR=${PKG_PREFIX}/ventrilo-server -NAME="Ventrilo" - -USER=ventrilo -UID=117 -GROUP=${USER} -GID=117 - -case $2 in -PRE-INSTALL) - 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 ${HOMEDIR} -s /sbin/nologin -c "${NAME} Server" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi - fi - - if ! [ -x ~${USER} ] ; then - mkdir -p "${HOMEDIR}" - chown ${USER}:${GROUP} "${HOMEDIR}" - fi - ;; - -POST-DEINSTALL) - if pw group show "${GROUP}" 2>/dev/null; then - if pw groupdel ${GROUP}; then - echo "Removed group \"${GROUP}\"." - else - echo "Removing group \"${GROUP}\" failed..." - exit 1 - fi - else - echo "Group \"${GROUP}\" doesn't exist!" - fi - - if pw user show "${USER}" 2>/dev/null; then - if pw userdel ${USER}; then - echo "Removed user \"${USER}\"." - else - echo "Removing user \"${USER}\" failed..." - exit 1 - fi - else - echo "User \"${USER}\" doesn't exist!" - fi - ;; -esac |