diff options
author | pgollucci <pgollucci@FreeBSD.org> | 2010-09-22 13:21:28 +0800 |
---|---|---|
committer | pgollucci <pgollucci@FreeBSD.org> | 2010-09-22 13:21:28 +0800 |
commit | 248eeaaa067a8495ce4851f568e812b457bed23a (patch) | |
tree | febf6db327d6925346376a8e95e1689d209b9898 /security/monkeysphere | |
parent | eadb3bf20567ec987de2520242e9015be2eba655 (diff) | |
download | freebsd-ports-gnome-248eeaaa067a8495ce4851f568e812b457bed23a.tar.gz freebsd-ports-gnome-248eeaaa067a8495ce4851f568e812b457bed23a.tar.zst freebsd-ports-gnome-248eeaaa067a8495ce4851f568e812b457bed23a.zip |
- Convert to USERS/GROUPS
PR: ports/150230
Submitted by: Eitan Adler <lists@eitanadler.com>
Approved by: dkg@fifthhorseman.net (maintainer)
Diffstat (limited to 'security/monkeysphere')
-rw-r--r-- | security/monkeysphere/Makefile | 3 | ||||
-rw-r--r-- | security/monkeysphere/pkg-deinstall | 3 | ||||
-rw-r--r-- | security/monkeysphere/pkg-install | 64 |
3 files changed, 3 insertions, 67 deletions
diff --git a/security/monkeysphere/Makefile b/security/monkeysphere/Makefile index 65d71f4bcef6..bb98fadaacd8 100644 --- a/security/monkeysphere/Makefile +++ b/security/monkeysphere/Makefile @@ -26,6 +26,9 @@ MAN7= monkeysphere.7 MAN8= monkeysphere-host.8 monkeysphere-authentication.8 MANCOMPRESSED= yes +USERS= monkeysphere +GROUPS= monkeysphere + MAKE_ARGS= ETCPREFIX=${PREFIX} MANPREFIX=${PREFIX}/man ETCSUFFIX=.sample # use proper system paths for FreeBSD instead of debian's: diff --git a/security/monkeysphere/pkg-deinstall b/security/monkeysphere/pkg-deinstall index 3e69eabbb1dd..6ec5b2d5f958 100644 --- a/security/monkeysphere/pkg-deinstall +++ b/security/monkeysphere/pkg-deinstall @@ -19,9 +19,6 @@ POST-DEINSTALL) # (note: FreeBSD does not seem to want the package-specific user to be # purged at package removal) - if pw user show "${USER}" 2>/dev/null >/dev/null; then - echo "Warning: If you will *NOT* use this package anymore, please remove the monkeysphere user manually." - fi if [ -d "$VARLIB" ] ; then echo "Warning: You may want to remove monkeysphere's cached authentication data and keyrings in $VARLIB" fi diff --git a/security/monkeysphere/pkg-install b/security/monkeysphere/pkg-install deleted file mode 100644 index 435c69ad12c0..000000000000 --- a/security/monkeysphere/pkg-install +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh - -# an installation script for monkeysphere (borrowing liberally from -# postgresql and mysql pkg-install scripts, and from monkeysphere's -# debian/monkeysphere.postinst) - -# Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net> -# Copyright 2008,2009 - -# FIXME: is /var/monkeysphere the right place for this stuff on -# FreeBSD? - -# PostgreSQL puts its data in /usr/local/pgsql/data - -# MySQL puts its data in /var/db/mysql - -VARLIB="/var/monkeysphere" -ETCDIR="/usr/local/etc/monkeysphere" - -case $2 in -POST-INSTALL) - USER=monkeysphere - GROUP=${USER} - UID=641 - GID=${UID} - SHELL=/usr/local/bin/bash - - if pw group show "${GROUP}" >/dev/null 2>&1; then - echo "You already have a group \"${GROUP}\", so I will use it." - else - if pw groupadd ${GROUP} -g ${GID}; then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - exit 1 - fi - fi - - if pw user show "${USER}" >/dev/null 2>&1; then - oldshell=`pw user show "${USER}" 2>/dev/null | cut -f10 -d:` - if [ x"$oldshell" != x"$SHELL" ]; then - echo "You already have a \"${USER}\" user, but its shell is '$oldshell'." - echo "This package requires that \"${USER}\"'s shell be '$SHELL'." - echo "You should fix this by hand and then re-install the package." - echo " hint: pw usermod '$USER' -s '$SHELL'" - exit 1 - fi - echo "You already have a user \"${USER}\" with the proper shell, so I will use it." - else - if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d "$VARLIB" -s /usr/local/bin/bash -c "monkeysphere authentication user,,," - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi - fi - - ## set up the monkeysphere authentication cache directory: - - monkeysphere-authentication setup - ;; -esac |