aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Rees <crees@FreeBSD.org>2011-07-25 20:22:12 +0000
committerChris Rees <crees@FreeBSD.org>2011-07-25 20:22:12 +0000
commitc2a08171feeea947f2a0f480529bf68a7eab754c (patch)
tree35bb4543086273d35aea5c7f3b45661b4aadab2b
parent814024137299e01bd39fd285e1ca3798dd86e48a (diff)
downloadports-c2a08171feeea947f2a0f480529bf68a7eab754c.tar.gz
ports-c2a08171feeea947f2a0f480529bf68a7eab754c.zip
net/gatekeeper now uses USERS/GROUPS
Approved by: rene (mentor, implicit)
Notes
Notes: svn path=/head/; revision=278326
-rw-r--r--GIDs1
-rw-r--r--UIDs1
-rw-r--r--net/gatekeeper/Makefile2
-rw-r--r--net/gatekeeper/pkg-install36
4 files changed, 4 insertions, 36 deletions
diff --git a/GIDs b/GIDs
index ad0353b353fb..057ecd310809 100644
--- a/GIDs
+++ b/GIDs
@@ -96,6 +96,7 @@ saned:*:194:
sympa:*:200:
dspam:*:202:
yate:*:204:
+gnugk:*:205:
shoutcast:*:210:
git:*:211:
hg:*:212:
diff --git a/UIDs b/UIDs
index 07a0fd9ff362..19fb0481db0f 100644
--- a/UIDs
+++ b/UIDs
@@ -103,6 +103,7 @@ sympa:*:200:200::0:0:Sympa Owner:/nonexistent:/usr/sbin/nologin
privoxy:*:201:201::0:0:Privoxy proxy user:/nonexistent:/usr/sbin/nologin
dspam:*:202:202::0:0:Dspam:/nonexistent:/usr/sbin/nologin
yate:*:204:204::0:0:Yate:/nonexistent:/usr/sbin/nologin
+gnugk:*:205:205::0:0:GNU GateKeeper pseudo-user:/nonexistent:/usr/sbin/nologin
shoutcast:*:210:210::0:0:Shoutcast sandbox:/nonexistent:/bin/sh
git:*:211:211::0:0:gitosis user:/usr/local/git:/bin/sh
hg:*:212:212::0:0:mercurial-server user:/usr/local/hg:/bin/sh
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