aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcrees <crees@FreeBSD.org>2011-08-12 18:16:09 +0800
committercrees <crees@FreeBSD.org>2011-08-12 18:16:09 +0800
commit07857f2bc20eb6912afa8fa525f72d143818efd0 (patch)
tree9e57b08e562594a62f7e685472375f3f6a22d595
parent2ff86c18ad5863dfa66571e0419b61b24e557fd3 (diff)
downloadfreebsd-ports-gnome-07857f2bc20eb6912afa8fa525f72d143818efd0.tar.gz
freebsd-ports-gnome-07857f2bc20eb6912afa8fa525f72d143818efd0.tar.zst
freebsd-ports-gnome-07857f2bc20eb6912afa8fa525f72d143818efd0.zip
No need to create www user any more -- www has been in base since 4.6.
Username is now no longer configurable however.
-rw-r--r--www/geronimo/Makefile8
-rw-r--r--www/geronimo/files/pkg-deinstall.in7
-rw-r--r--www/geronimo/files/pkg-install.in53
3 files changed, 4 insertions, 64 deletions
diff --git a/www/geronimo/Makefile b/www/geronimo/Makefile
index 7c15573ebb7c..028fa6b48d87 100644
--- a/www/geronimo/Makefile
+++ b/www/geronimo/Makefile
@@ -20,7 +20,7 @@ JAVA_VERSION= 1.5+
NO_BUILD= YES
USE_RC_SUBR= geronimo2.sh
-SUB_FILES= pkg-install pkg-deinstall
+SUB_FILES= pkg-deinstall
OPTIONS= TOMCAT6 "Use Tomcat instead of default Jetty" off
@@ -37,6 +37,9 @@ APP_HOME?= ${PREFIX}/${PKGBASE}${MAJOR_VER}
LOG_DIR= ${APP_HOME}/var/log
APP_TITLE= Geronimo
APP_SHORTNAME= geronimo${MAJOR_VER}
+.if defined(GERONIMO_USER)
+IGNORE= no longer allows customisation of GERONIMO_USER or GERONIMO_GROUP
+.endif
GERONIMO_USER?= www
GERONIMO_GROUP?=www
GERONIMO_OUT= ${LOG_DIR}/geronimo.out
@@ -73,9 +76,6 @@ post-patch:
@${RM} -f `${FIND} ${WRKSRC} -name '*.bat'` `${FIND} ${WRKSRC} -name '*.orig'` `${FIND} ${WRKSRC} -name '*.exe'`
@${ECHO_MSG} " [ DONE ]"
-pre-install:
- @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-
do-install:
${MKDIR} ${APP_HOME} && ${CHOWN} ${GERONIMO_USER}:${GERONIMO_GROUP} ${APP_HOME}
@(cd ${WRKSRC} && ${FIND} . |\
diff --git a/www/geronimo/files/pkg-deinstall.in b/www/geronimo/files/pkg-deinstall.in
index 655ee46519d3..48766068aca2 100644
--- a/www/geronimo/files/pkg-deinstall.in
+++ b/www/geronimo/files/pkg-deinstall.in
@@ -37,11 +37,4 @@ if [ "$2" = "DEINSTALL" ]; then
fi
fi
-if [ "$2" = "POST-DEINSTALL" ]; then
- # If the user exists, then display a message
- if pw usershow "${USER}" 2>/dev/null 1>&2; then
- echo "To delete the ${USER} user permanently, use 'pw userdel ${USER}'"
- fi
-fi
-
exit 0
diff --git a/www/geronimo/files/pkg-install.in b/www/geronimo/files/pkg-install.in
deleted file mode 100644
index ddc5dfda878a..000000000000
--- a/www/geronimo/files/pkg-install.in
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-#
-# Checks if the '%%USER%%' user and '%%GROUP%%' group exist. If they don't, then
-# an attempt is made to create both.
-#
-# $FreeBSD$
-#
-
-# Make sure we're called during the 'make install' process
-if [ "$2" != "PRE-INSTALL" ]; then
- exit 0
-fi
-
-# Set some constants
-UID=80
-GID=${UID}
-USER=%%USER%%
-GROUP=%%GROUP%%
-
-# 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}\"."
- elif pw groupadd "${GROUP}"; 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}\"."
- elif pw useradd "${USER}" -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