diff options
author | crees <crees@FreeBSD.org> | 2011-06-28 02:01:18 +0800 |
---|---|---|
committer | crees <crees@FreeBSD.org> | 2011-06-28 02:01:18 +0800 |
commit | d3a8c40db2831f463a0feba45160bd3d0d134a32 (patch) | |
tree | 1d012f546c11787b5d38dbc21a61609f4a411ebe | |
parent | 60b4e81e6af12dc7fff6ce100acc0e59dd592b01 (diff) | |
download | freebsd-ports-graphics-d3a8c40db2831f463a0feba45160bd3d0d134a32.tar.gz freebsd-ports-graphics-d3a8c40db2831f463a0feba45160bd3d0d134a32.tar.zst freebsd-ports-graphics-d3a8c40db2831f463a0feba45160bd3d0d134a32.zip |
- Use USERS and GROUPS
PR: ports/157585
Submitted by: Chris Rees (utisoft@gmail.com)
Approved by: tabthorpe (co-mentor)
-rw-r--r-- | java/jboss2/Makefile | 4 | ||||
-rw-r--r-- | java/jboss2/pkg-deinstall | 9 | ||||
-rw-r--r-- | java/jboss2/pkg-install | 46 |
3 files changed, 3 insertions, 56 deletions
diff --git a/java/jboss2/Makefile b/java/jboss2/Makefile index ee258753244..e669bd26486 100644 --- a/java/jboss2/Makefile +++ b/java/jboss2/Makefile @@ -41,7 +41,8 @@ STARTUP_SCRIPT_NAME= ${APP_SHORTNAME}.sh STARTUP_SCRIPT= ${PREFIX}/etc/rc.d/${STARTUP_ORDER}.${STARTUP_SCRIPT_NAME} USER= www GROUP= www -PW?= /usr/sbin/pw +USERS= ${USER} +GROUPS= ${GROUP} STDOUT_LOG= ${LOG_DIR}/stdout.log STDERR_LOG= ${LOG_DIR}/stderr.log AUTO_START?= NO @@ -116,7 +117,6 @@ pre-install: @${ECHO_CMD} " Logfile stderr: ${STDERR_LOG}" @${ECHO_CMD} " Starting after install: ${AUTO_START}" @${ECHO_CMD} " Stop time-out: ${STOP_TIMEOUT} sec." - @PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL do-install: @${ECHO_CMD} -n ">> Creating destination directory..." diff --git a/java/jboss2/pkg-deinstall b/java/jboss2/pkg-deinstall index 4be88cc482a..ea2066de186 100644 --- a/java/jboss2/pkg-deinstall +++ b/java/jboss2/pkg-deinstall @@ -8,7 +8,7 @@ # * Checks if the 'www' user exists. If it does, then it displays # a message. # -# $FreeBSD: /tmp/pcvs/ports/java/jboss2/pkg-deinstall,v 1.1 2002-04-26 21:54:15 znerd Exp $ +# $FreeBSD: /tmp/pcvs/ports/java/jboss2/pkg-deinstall,v 1.2 2011-06-27 18:01:18 crees Exp $ # # Make sure we're in the right stage of the process @@ -35,11 +35,4 @@ if [ "$2" = "DEINSTALL" ]; then fi fi -if [ "$2" = "POST-DEINSTALL" ]; then - # If the user exists, then display a message - if pw usershow "www" 2>/dev/null 1>&2; then - echo "To delete the www user permanently, use 'pw userdel www'" - fi -fi - exit 0 diff --git a/java/jboss2/pkg-install b/java/jboss2/pkg-install deleted file mode 100644 index 83edcc6e23b..00000000000 --- a/java/jboss2/pkg-install +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -# -# Checks if the 'www' user and group exist. If they don't, then -# an attempt is made to create both. -# -# $FreeBSD: /tmp/pcvs/ports/java/jboss2/Attic/pkg-install,v 1.1 2002-04-26 21:54:15 znerd Exp $ -# - -# Make sure we're called during the 'make install' process -if [ "$2" != "PRE-INSTALL" ]; then - exit 0 -fi - -# Set some constants -USER=www -GROUP=${USER} -UID=80 -GID=${UID} - -# See if the group already exists -if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then - - # If not, try to create it - if pw groupadd ${GROUP} -g ${GID}; then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - exit 1 - fi -fi - -# See if the user already exists -if ! pw usershow "${USER}" 2>/dev/null 1>&2; then - - # If not, try to create it - if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -s "/sbin/nologin" -d "/nonexistent" \ - -c "World Wide Web Owner"; \ - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi -fi -exit 0 |