summaryrefslogtreecommitdiff
path: root/net-mgmt
diff options
context:
space:
mode:
authorBernhard Froehlich <decke@FreeBSD.org>2010-07-27 08:07:15 +0000
committerBernhard Froehlich <decke@FreeBSD.org>2010-07-27 08:07:15 +0000
commite269303f94674a689f598cb681fcffd77913f6da (patch)
tree648dd37e527f8e5962a69a783084b1682b1d2600 /net-mgmt
parent- Update to 0.9.3 (diff)
- Convert to new USERS/GROUPS framework
- Bumped PORTREVISION PR: ports/148319 Submitted by: Bapt <baptiste dot daroussin at gmail dot com> Approved by: miwi (mentor)
Notes
Notes: svn path=/head/; revision=258317
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/nefu/Makefile10
-rw-r--r--net-mgmt/nefu/pkg-deinstall70
-rw-r--r--net-mgmt/nefu/pkg-install25
3 files changed, 5 insertions, 100 deletions
diff --git a/net-mgmt/nefu/Makefile b/net-mgmt/nefu/Makefile
index 2a4fcf6a07a5..fc40555f8e15 100644
--- a/net-mgmt/nefu/Makefile
+++ b/net-mgmt/nefu/Makefile
@@ -7,6 +7,7 @@
PORTNAME= nefu
PORTVERSION= 1.5
+PORTREVISION= 1
CATEGORIES= net-mgmt
MASTER_SITES= http://rsug.itd.umich.edu/software/nefu/files/
EXTRACT_SUFX= .tgz
@@ -27,8 +28,8 @@ CONFIGURE_ARGS+= --with-ssl=${OPENSSLBASE} \
--without-zlib \
--without-shelltests
-NEFU_USER= nefu
-NEFU_GROUP= nefu
+USERS= nefu
+GROUPS= nefu
USE_OPENSSL= yes
OPTIONS= LDAP "Enable OpenLDAP support" off \
@@ -71,12 +72,11 @@ do-install:
${INSTALL_MAN} ${WRKSRC}/nefu.conf.4 ${PREFIX}/man/man4
post-install:
- @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.if defined(WITH_HTML)
${MKDIR} ${WWWDIR}
- ${CHOWN} -R ${NEFU_USER}:${NEFU_GROUP} ${WWWDIR}
+ ${CHOWN} -R ${USERS}:${GROUPS} ${WWWDIR}
.endif
${MKDIR} ${DBDIR}
- ${CHOWN} -R ${NEFU_USER}:${NEFU_GROUP} ${DBDIR}
+ ${CHOWN} -R ${USERS}:${GROUPS} ${DBDIR}
.include <bsd.port.post.mk>
diff --git a/net-mgmt/nefu/pkg-deinstall b/net-mgmt/nefu/pkg-deinstall
deleted file mode 100644
index 123ea4b8eb97..000000000000
--- a/net-mgmt/nefu/pkg-deinstall
+++ /dev/null
@@ -1,70 +0,0 @@
-#! /bin/sh
-
-ask() {
- local question default answer
-
- question=$1
- default=$2
- if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then
- read -p "${question} [${default}]? " answer
- fi
- if [ x${answer} = x ]; then
- answer=${default}
- fi
- echo ${answer}
-}
-
-yesno() {
- local dflt question answer
-
- question=$1
- dflt=$2
- while :; do
- answer=$(ask "${question}" "${dflt}")
- case "${answer}" in
- [Yy]*) return 0;;
- [Nn]*) return 1;;
- esac
- echo "Please answer yes or no."
- done
-}
-
-delete_account() {
- local u g home
-
- u=$1
- g=$2
- if pw group show ${g} > /dev/null 2>&1; then
- if yesno "Do you want me to remove group \"${g}\"" y; then
- pw group del -n ${g}
- echo "Done."
- else
- GID=`pw group show ${g} | awk -F: '{ print $3 }'`
- fi
- fi
- if pw user show ${u} > /dev/null 2>&1; then
- if yesno "Do you want me to remove user \"${u}\"" y; then
- eval home=~${u}
- pw user del -n ${u} -r
- echo "Done."
- if [ -d "${home}" ]; then
- echo "Please remember to remove the home directory \"${home}\""
- fi
-
- # pw user del may have removed the group, too.
- # Put it back if the admin asked us to retain it.
- if [ -n "$GID" ]; then
- pw group show ${g} > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- pw group add ${g}
- fi
- fi
- fi
- fi
-}
-
-case $2 in
- POST-DEINSTALL)
- delete_account nefu nefu
- ;;
-esac
diff --git a/net-mgmt/nefu/pkg-install b/net-mgmt/nefu/pkg-install
deleted file mode 100644
index b7d05b4a62d5..000000000000
--- a/net-mgmt/nefu/pkg-install
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-case $2 in
-POST-INSTALL)
- USER=nefu
- GROUP=nefu
- UID=918
- GID=918
-
- if pw groupshow "${GROUP}" > /dev/null 2>&1; then
- echo "===> Using existing group ${GROUP}"
- else
- echo "===> Adding group ${GROUP}"
- pw groupadd ${GROUP} -g ${GID} || exit 1
- fi
-
- if pw usershow "${USER}" > /dev/null 2>&1; then
- echo "===> Using existing user ${USER}"
- else
- echo "===> Adding user ${USER}"
- pw adduser ${USER} -u ${UID} -g ${GROUP} -h - -d "/var/db/nefu" \
- -s "/sbin/nologin" -c "Nefu daemon" || exit 1
- fi
- ;;
-esac