diff options
author | crees <crees@FreeBSD.org> | 2011-07-11 01:37:11 +0800 |
---|---|---|
committer | crees <crees@FreeBSD.org> | 2011-07-11 01:37:11 +0800 |
commit | e211152afd65107d8cccbf294c051ac2f48eec7b (patch) | |
tree | 6ee3cb710de06f26be1f310534c098ad13c5d39e /databases | |
parent | a3428a3abec3ab01fc20f3afc76fdfe4de89555c (diff) | |
download | freebsd-ports-gnome-e211152afd65107d8cccbf294c051ac2f48eec7b.tar.gz freebsd-ports-gnome-e211152afd65107d8cccbf294c051ac2f48eec7b.tar.zst freebsd-ports-gnome-e211152afd65107d8cccbf294c051ac2f48eec7b.zip |
Use USERS and GROUPS
PR: ports/157555
Submitted by: crees (me)
Approved by: rene (mentor, implicit), maintainer timeout (acm, 35 days)
Diffstat (limited to 'databases')
-rw-r--r-- | databases/firebird25-server/Makefile | 5 | ||||
-rw-r--r-- | databases/firebird25-server/files/pkg-install.in | 47 |
2 files changed, 4 insertions, 48 deletions
diff --git a/databases/firebird25-server/Makefile b/databases/firebird25-server/Makefile index e13e0999a9aa..7d478c981965 100644 --- a/databases/firebird25-server/Makefile +++ b/databases/firebird25-server/Makefile @@ -121,8 +121,9 @@ CFLAGS+= -DAMD64 .endif .if !defined(CLIENT_ONLY) -pre-su-install: - @${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL + +USERS= ${PORTNAME} +GROUPS= ${USERS} post-install: @${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL diff --git a/databases/firebird25-server/files/pkg-install.in b/databases/firebird25-server/files/pkg-install.in index c74821080906..b80c710d0b25 100644 --- a/databases/firebird25-server/files/pkg-install.in +++ b/databases/firebird25-server/files/pkg-install.in @@ -1,55 +1,10 @@ #!/bin/sh -# $FreeBSD: /tmp/pcvs/ports/databases/firebird25-server/files/pkg-install.in,v 1.1 2010-12-20 08:48:54 acm Exp $ +# $FreeBSD: /tmp/pcvs/ports/databases/firebird25-server/files/pkg-install.in,v 1.2 2011-07-10 17:37:11 crees Exp $ PATH=/bin:/usr/bin:/usr/sbin case $2 in -PRE-INSTALL) - -if [ `id -u` -ne 0 ]; then - echo; echo "You must be root to run this step!"; echo; echo - exit 1 -fi - -nofbuid=0 -fbUID=`id -u firebird 2>/dev/null` -if [ $? -ne 0 ]; then - fbUID=90 - while [ ! -z `id -un $fbUID 2>/dev/null` ] - do - fbUID=$(($fbUID+1)) - done - nofbuid=1 -fi - -fbGID=`pw groupshow firebird 2>/dev/null` -if [ $? -ne 0 ]; then - fbGID=90 - while [ ! -z `id -gn $fbGID 2>/dev/null` ] - do - fbGID=$(($fbGID+1)) - done - echo "firebird:*:$fbGID:" >> /etc/group -else - fbGID=`echo $fbGID | awk -F: '{print $3}'` -fi - -echo "firebird user using uid $fbUID" -echo "firebird user using gid $fbGID" - -if which -s pw; then - if [ $nofbuid -ne 0 ]; then - pw useradd firebird -u $fbUID -g $fbGID -h - -s /usr/sbin/nologin \ - -d /nonexistent -c "Firebird Database Administrator" - fi -else - echo -n "unable to create user firebird - please create it manually," - echo " before reinstalling this package." - exit 1 -fi -;; - POST-INSTALL) cd /var/db/firebird |