aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt
diff options
context:
space:
mode:
authorLars Thegler <lth@FreeBSD.org>2010-08-12 13:20:34 +0000
committerLars Thegler <lth@FreeBSD.org>2010-08-12 13:20:34 +0000
commitbd8e224a098dbde8f5aea0ce40864848a3684ad2 (patch)
treed7bbdb3ee4d9ff478dd0f28f7ef88a7b8b37a632 /net-mgmt
parent29d125fecc2133a1cd130d0a80a19e48a3e574d7 (diff)
downloadports-bd8e224a098dbde8f5aea0ce40864848a3684ad2.tar.gz
ports-bd8e224a098dbde8f5aea0ce40864848a3684ad2.zip
Notes
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/ifgraph/Makefile9
-rw-r--r--net-mgmt/ifgraph/files/pkg-deinstall.in21
-rw-r--r--net-mgmt/ifgraph/files/pkg-install.in30
3 files changed, 5 insertions, 55 deletions
diff --git a/net-mgmt/ifgraph/Makefile b/net-mgmt/ifgraph/Makefile
index 4d0dc4e0a5be..399cfe16d8e7 100644
--- a/net-mgmt/ifgraph/Makefile
+++ b/net-mgmt/ifgraph/Makefile
@@ -26,17 +26,14 @@ PKGMESSAGE= ${WRKDIR}/pkg-message
PKGINSTALL= ${WRKDIR}/pkg-install
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
-IFGRAPH_USER= ifgraph
-IFGRAPH_GROUP= ifgraph
+USERS= ifgraph
+GROUPS= ifgraph
PLFILES= find-if.pl ifgraph.pl makegraph.pl
DOCFILES= CHANGELOG INSTALACAO INSTALL TODO LICENSE.TXT MUDANCAS
SUB_FILES= crontab pkg-deinstall pkg-install pkg-message
-SUB_LIST= USER=${IFGRAPH_USER} GROUP=${IFGRAPH_GROUP} PERL=${PERL}
-
-pre-install:
- @ ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+SUB_LIST= USER=${USERS} PERL=${PERL}
do-install:
.for plfile in ${PLFILES}
diff --git a/net-mgmt/ifgraph/files/pkg-deinstall.in b/net-mgmt/ifgraph/files/pkg-deinstall.in
index 8c58d2e1603f..6868a7f93bef 100644
--- a/net-mgmt/ifgraph/files/pkg-deinstall.in
+++ b/net-mgmt/ifgraph/files/pkg-deinstall.in
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $FreeBSD: /tmp/pcvs/ports/net-mgmt/ifgraph/files/pkg-deinstall.in,v 1.1 2010-01-24 18:51:29 lth Exp $
+# $FreeBSD: /tmp/pcvs/ports/net-mgmt/ifgraph/files/pkg-deinstall.in,v 1.2 2010-08-12 13:20:34 lth Exp $
#
PATH=/bin:/usr/bin:/usr/sbin
@@ -16,23 +16,4 @@ DEINSTALL)
;;
-POST-DEINSTALL)
- echo '---> Starting post-deinstall script:'
-
- if [ -f %%PREFIX%%/etc/ifgraph.conf -o \
- -d %%PREFIX%%/ifgraph -o \
- -d %%PREFIX%%/var/ifgraph ]; then
- echo '---> You seem to have made some custom ifGraph configuration.'
- echo '---> - The "%%USER%%" user and "%%GROUP%%" group were therefore not deleted.'
- echo '---> - You may delete them with "pw groupdel %%GROUP%%; pw userdel %%USER%%".'
-
- else
- echo '---> Removing group "%%GROUP%%"'
- /usr/sbin/pw groupdel -n %%GROUP%%
- echo '---> Removing user "%%USER%%"'
- echo 'y' | /usr/sbin/pw userdel -n %%USER%%
- fi
-
- ;;
-
esac
diff --git a/net-mgmt/ifgraph/files/pkg-install.in b/net-mgmt/ifgraph/files/pkg-install.in
index 9cd574dd232d..56a52171ba89 100644
--- a/net-mgmt/ifgraph/files/pkg-install.in
+++ b/net-mgmt/ifgraph/files/pkg-install.in
@@ -1,39 +1,11 @@
#!/bin/sh
#
-# $FreeBSD: /tmp/pcvs/ports/net-mgmt/ifgraph/files/pkg-install.in,v 1.1 2010-01-24 18:51:29 lth Exp $
+# $FreeBSD: /tmp/pcvs/ports/net-mgmt/ifgraph/files/pkg-install.in,v 1.2 2010-08-12 13:20:34 lth Exp $
#
PATH=/bin:/usr/bin:/usr/sbin
case $2 in
-
-PRE-INSTALL)
- echo "---> Starting pre-install script:"
-
- if [ -z "%%USER%%" -o \
- -z "%%GROUP%%" ]; then
- echo "ERROR: A required pragma was empty"
- exit 1
- fi
-
- if pw showgroup "%%GROUP%%" 2>/dev/null; then
- echo "---> Using existing group \"%%GROUP%%\""
- else
- echo "---> Adding group \"%%GROUP%%\""
- pw addgroup %%GROUP%% -h - || exit 1
- fi
-
- # Create user if required
- if pw showuser "%%USER%%" 2>/dev/null; then
- echo "---> Using existing user \"%%USER%%\""
- else
- echo "---> Adding user \"%%USER%%\""
- pw adduser %%USER%% -g %%GROUP%% -h - \
- -s "/sbin/nologin" -c "ifGraph User" || exit 1
- fi
-
- ;;
-
POST-INSTALL)
echo "---> Starting post-install script:"