diff options
author | Chris Rees <crees@FreeBSD.org> | 2011-07-25 20:22:12 +0000 |
---|---|---|
committer | Chris Rees <crees@FreeBSD.org> | 2011-07-25 20:22:12 +0000 |
commit | c2a08171feeea947f2a0f480529bf68a7eab754c (patch) | |
tree | 35bb4543086273d35aea5c7f3b45661b4aadab2b /net/gatekeeper | |
parent | 814024137299e01bd39fd285e1ca3798dd86e48a (diff) |
net/gatekeeper now uses USERS/GROUPS
Approved by: rene (mentor, implicit)
Notes
Notes:
svn path=/head/; revision=278326
Diffstat (limited to 'net/gatekeeper')
-rw-r--r-- | net/gatekeeper/Makefile | 2 | ||||
-rw-r--r-- | net/gatekeeper/pkg-install | 36 |
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 |