aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorcrees <crees@FreeBSD.org>2011-07-26 04:22:12 +0800
committercrees <crees@FreeBSD.org>2011-07-26 04:22:12 +0800
commit7ac88f24833fbd5c2df023af668ee0348597413b (patch)
tree10297d5d17e401acebe0f7ecfcfbf23758e38f2c /net
parent63d8d0a237c67ff979dd874a0e7ffb8624ba6ae5 (diff)
downloadfreebsd-ports-gnome-7ac88f24833fbd5c2df023af668ee0348597413b.tar.gz
freebsd-ports-gnome-7ac88f24833fbd5c2df023af668ee0348597413b.tar.zst
freebsd-ports-gnome-7ac88f24833fbd5c2df023af668ee0348597413b.zip
net/gatekeeper now uses USERS/GROUPS
Approved by: rene (mentor, implicit)
Diffstat (limited to 'net')
-rw-r--r--net/gatekeeper/Makefile2
-rw-r--r--net/gatekeeper/pkg-install36
2 files changed, 2 insertions, 36 deletions
diff --git a/net/gatekeeper/Makefile b/net/gatekeeper/Makefile
index 7e1fa7aef118..76bb8284dda7 100644
--- a/net/gatekeeper/Makefile
+++ b/net/gatekeeper/Makefile
@@ -21,6 +21,8 @@ LIB_DEPENDS= h323_r.1:${PORTSDIR}/net/openh323
#WRKSRC= ${WRKDIR}/${MASTER_SITE_SUBDIR}-${DISTVERSION:C/-[0-9]$//}
USE_RC_SUBR= gnugk.sh
+USERS= gnugk
+GROUPS= ${USERS}
USE_AUTOTOOLS= autoconf
CONFIGURE_ARGS+= --disable-firebird
diff --git a/net/gatekeeper/pkg-install b/net/gatekeeper/pkg-install
index 9879f14726d8..09d2701a116e 100644
--- a/net/gatekeeper/pkg-install
+++ b/net/gatekeeper/pkg-install
@@ -12,45 +12,9 @@ gnugk_config=${PKG_PREFIX:-"/usr/local"}/etc/gnugk.ini
gnugk_logdir="/var/log/gnugk"
gnugk_piddir="/var/run/gnugk"
-if [ -x /usr/sbin/nologin ]; then
- nologin=/usr/sbin/nologin
-else
- nologin=/sbin/nologin
-fi
-
case $2 in
PRE-INSTALL)
echo "===> Pre-installation configuration for ${pkgname}"
- if ! pw groupshow ${gnugk_group} -q >/dev/null ; then
- echo "There is no group '${gnugk_group}' on this system, so I will try to create it:"
- if ! pw groupadd ${gnugk_group} -q -h - ; then
- echo "Failed to create group \"${gnugk_group}\"!" >&2
- echo "Please create it manually." >&2
- exit 1
- else
- echo "Group '${gnugk_group}' created successfully:"
- fi
- else
- echo "I will use the existing group '${gnugk_group}':"
- fi
- pw groupshow ${gnugk_group}
-
- if ! pw usershow ${gnugk_user} -q >/dev/null ; then
- echo "There is no account '${gnugk_user}' on this system, so I will try to create it:"
- if ! pw useradd -q -n ${gnugk_user} \
- -g ${gnugk_group} -d/nonexistent \
- -c "GNU Gatekeeper pseudo user" \
- -s "${nologin}" -h - ; then
- echo "Failed to create user '${gnugk_user}'!" >&2
- echo "Please create it manually." >&2
- exit 1
- else
- echo "User '${gnugk_user}' created successfully:"
- fi
- else
- echo "I will use the existing user '${gnugk_user}':"
- fi
- pw usershow ${gnugk_user}
for dir in ${gnugk_logdir} ${gnugk_piddir}; do
if [ ! -d ${dir} ]; then