diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2003-09-20 13:16:46 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2003-09-20 13:16:46 +0000 |
commit | 0ff9b555dc3e395b1398baff82a46a91752c440f (patch) | |
tree | aa42c6dbda0f520fdda023776ef8f27018214d80 /databases/gnats4/pkg-install | |
parent | 497c13571f23bbbe77a41d527abf20f4022c3ece (diff) | |
download | ports-0ff9b555dc3e395b1398baff82a46a91752c440f.tar.gz ports-0ff9b555dc3e395b1398baff82a46a91752c440f.zip |
Gnats 4.0, a complete rewrite of the good old GNU bug tracking system.
PR: ports/55876
Submitted by: Oliver Eikemeier <eikemeier@fillmore-labs.com>
Notes
Notes:
svn path=/head/; revision=89076
Diffstat (limited to 'databases/gnats4/pkg-install')
-rw-r--r-- | databases/gnats4/pkg-install | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/databases/gnats4/pkg-install b/databases/gnats4/pkg-install new file mode 100644 index 000000000000..6dbcc2492c6b --- /dev/null +++ b/databases/gnats4/pkg-install @@ -0,0 +1,34 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +ECHO_CMD=echo +GREP=/usr/bin/grep +ID=/usr/bin/id +PW=/usr/sbin/pw +FTPUSERS=/etc/ftpusers + +case $2 in +PRE-INSTALL) + if ! ${ID} -u gnats >/dev/null 2>&1; then + if ${PW} add user -n gnats -u 61 -g 1 -d ${PKG_PREFIX}/share/gnats \ + -c "GNATS database owner" -p "*"; then + ${GREP} -qs '^gnats$' ${FTPUSERS} || ${ECHO_CMD} gnats >>/etc/ftpusers + else + ${ECHO_CMD} + ${ECHO_CMD} "The FreeBSD standard userid for gnats is 61, but this system" + ${ECHO_CMD} "has already a different account with this userid: \``${ID} -un 61`'" + ${ECHO_CMD} + ${ECHO_CMD} "You can either delete this account (which may be dangerous) with" + ${ECHO_CMD} " ${PW} userdel -u 61" + ${ECHO_CMD} "or add the gnats user with an other userid with" + ${ECHO_CMD} " ${PW} useradd -n gnats -g 1 \\" + ${ECHO_CMD} " -d ${PKG_PREFIX}/share/gnats -c 'GNATS database owner' -p '*'" + ${ECHO_CMD} "and retry installing this package" + ${ECHO_CMD} + exit 1 + fi + fi + ;; +esac |