diff options
author | crees <crees@FreeBSD.org> | 2011-06-28 01:57:53 +0800 |
---|---|---|
committer | crees <crees@FreeBSD.org> | 2011-06-28 01:57:53 +0800 |
commit | bd74d4ecf951cb443a8baf3b171a5b29fb3c3f8c (patch) | |
tree | 245d88982e1bcf4cdfbf62ca485c50a28c3c503c /irc/hybserv | |
parent | 244bd3f926138ef6314a94a2868fb99190618a31 (diff) | |
download | freebsd-ports-gnome-bd74d4ecf951cb443a8baf3b171a5b29fb3c3f8c.tar.gz freebsd-ports-gnome-bd74d4ecf951cb443a8baf3b171a5b29fb3c3f8c.tar.zst freebsd-ports-gnome-bd74d4ecf951cb443a8baf3b171a5b29fb3c3f8c.zip |
- Use USERS and GROUPS
PR: ports/157580
Submitted by: Chris Rees (utisoft@gmail.com)
Approved by: tabthorpe (co-mentor)
Diffstat (limited to 'irc/hybserv')
-rw-r--r-- | irc/hybserv/Makefile | 6 | ||||
-rw-r--r-- | irc/hybserv/pkg-install | 40 |
2 files changed, 3 insertions, 43 deletions
diff --git a/irc/hybserv/Makefile b/irc/hybserv/Makefile index 74f93d281320..b36a1f22034e 100644 --- a/irc/hybserv/Makefile +++ b/irc/hybserv/Makefile @@ -16,6 +16,9 @@ COMMENT= HybServ2 IRCD Services USE_GMAKE= yes GNU_CONFIGURE= yes +USERS= ${PORTNAME} +GROUPS= ${USERS} + WRKSRC= ${WRKDIR}/hybserv .if defined(WITH_DAEMONTOOLS) @@ -23,9 +26,6 @@ CONFIGURE_ARGS+= --with-daemontools RUN_DEPENDS+= supervise:${PORTSDIR}/sysutils/daemontools .endif -pre-install: - @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - post-install: @${SED} -e "s#%PREFIX%#${PREFIX}#" ${FILESDIR}/hybserv.sh \ > ${WRKDIR}/hybserv.sh diff --git a/irc/hybserv/pkg-install b/irc/hybserv/pkg-install deleted file mode 100644 index 197f04cf1c3a..000000000000 --- a/irc/hybserv/pkg-install +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -if [ "x$2" != "xPRE-INSTALL" ]; then - exit 0; -fi - - USER=hybserv - GROUP=${USER} - UID=76 - GID=${UID} - 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." - if pw usermod ${USER} -d ${NONEXISTENT} - then - echo "Changed home directory of \"${USER}\" to \"${NONEXISTENT}\"" - else - echo "Changing home directory of \"${USER}\" to \"${NONEXISTENT}\" failed..." - exit 1 - fi - else - if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d ${NONEXISTENT} -s /sbin/nologin -c "HybServ Daemon" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi - fi |