1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

net/gatekeeper now uses USERS/GROUPS

Approved by:	rene (mentor, implicit)
This commit is contained in:
Chris Rees 2011-07-25 20:22:12 +00:00
parent 8140241372
commit c2a08171fe
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=278326
4 changed files with 4 additions and 36 deletions

1
GIDs
View File

@ -96,6 +96,7 @@ saned:*:194:
sympa:*:200:
dspam:*:202:
yate:*:204:
gnugk:*:205:
shoutcast:*:210:
git:*:211:
hg:*:212:

1
UIDs
View File

@ -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

View File

@ -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

View File

@ -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