ports/157915: [patch] fix USERS in www/tomcat55
Eitan Adler
lists at eitanadler.com
Wed Jun 15 23:40:09 UTC 2011
>Number: 157915
>Category: ports
>Synopsis: [patch] fix USERS in www/tomcat55
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed Jun 15 23:40:08 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Eitan Adler
>Release:
>Organization:
>Environment:
>Description:
>How-To-Repeat:
>Fix:
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/www/tomcat55/Makefile,v
retrieving revision 1.58
diff -u -r1.58 Makefile
--- Makefile 15 Feb 2011 07:22:27 -0000 1.58
+++ Makefile 7 Jun 2011 23:06:33 -0000
@@ -34,6 +34,8 @@
TOMCAT_USER?= www
TOMCAT_GROUP?= www
TOMCAT_UID?= 80
+USERS= ${TOMCAT_USER}
+GROUPS= ${TOMCAT_GROUP}
HTTP_PORT?= 8180
HTTP_TIMEOUT?= 20000
SHUTDOWN_PORT?= 8005
Index: files/pkg-install.in
===================================================================
RCS file: /home/ncvs/ports/www/tomcat55/files/pkg-install.in,v
retrieving revision 1.3
diff -u -r1.3 pkg-install.in
--- files/pkg-install.in 7 Oct 2010 21:17:37 -0000 1.3
+++ files/pkg-install.in 7 Jun 2011 23:06:33 -0000
@@ -19,46 +19,6 @@
STDOUT_LOG=%%STDOUT_LOG%%
STDERR_LOG=%%STDERR_LOG%%
-uidgid() {
-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}\"."
- elif pw groupadd "${GROUP}"; then
- echo "Added group \"${GROUP}\"."
- else
- echo "Adding group \"${GROUP}\" failed..."
- exit 1
- fi
-else
- echo "You already have a group \"${GROUP}\", so I will use it."
-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 "/usr/sbin/nologin" -d "/nonexistent" \
- -c "World Wide Web Owner";
- then
- echo "Added user \"${USER}\"."
- elif pw useradd "${USER}" -g "${GROUP}" -h - \
- -s "/usr/sbin/nologin" -d "/nonexistent" \
- -c "World Wide Web Owner";
- then
- echo "Added user \"${USER}\"."
- else
- echo "Adding user \"${USER}\" failed..."
- exit 1
- fi
-else
- echo "You already have a user \"${USER}\", so I will use it."
-fi
-}
-
-
post() {
echo -n ">> Creating destination directory..."
mkdir -p ${APP_HOME}
@@ -93,13 +53,11 @@
# PACKAGE_BUILDING is only defined on the build cluster or tinderbox!
# No interactive parts, there is no one who can answer!
if [ "x${PACKAGE_BUILDING}" != "x" ]; then
- uidgid
post
exit 0
fi
if [ "$2" = "POST-INSTALL" ]; then
- uidgid
post
exit 0
fi
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list