Date: Fri, 02 Jul 2010 17:34:20 +0200 From: Bapt <baptiste.daroussin@gmail.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: lth@FreeBSD.org Subject: ports/148320: [PATCH] net-mgmt/ifgraph: use USERS/GROUPS Message-ID: <cf2a0@azathoth.lan> Resent-Message-ID: <201007021540.o62Fe7Rq065182@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 148320 >Category: ports >Synopsis: [PATCH] net-mgmt/ifgraph: use USERS/GROUPS >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jul 02 15:40:07 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Bapt >Release: FreeBSD 8.1-PRERELEASE amd64 >Organization: >Environment: System: FreeBSD azathoth.lan 8.1-PRERELEASE FreeBSD 8.1-PRERELEASE #5 r208894M: Tue Jun 8 11:03:27 >Description: Use the USERS/GROUPS Port maintainer (lth@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.99 >How-To-Repeat: >Fix: --- ifgraph-0.4.10_3.patch begins here --- diff -ruN --exclude=CVS /usr/ports/net-mgmt/ifgraph.orig/Makefile /usr/ports/net-mgmt/ifgraph/Makefile --- /usr/ports/net-mgmt/ifgraph.orig/Makefile 2010-03-28 08:41:52.000000000 +0200 +++ /usr/ports/net-mgmt/ifgraph/Makefile 2010-07-02 17:31:59.983407842 +0200 @@ -26,17 +26,14 @@ 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 -ruN --exclude=CVS /usr/ports/net-mgmt/ifgraph.orig/files/pkg-deinstall.in /usr/ports/net-mgmt/ifgraph/files/pkg-deinstall.in --- /usr/ports/net-mgmt/ifgraph.orig/files/pkg-deinstall.in 2010-01-24 19:51:29.000000000 +0100 +++ /usr/ports/net-mgmt/ifgraph/files/pkg-deinstall.in 2010-07-02 17:32:59.793172747 +0200 @@ -16,23 +16,4 @@ ;; -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 -ruN --exclude=CVS /usr/ports/net-mgmt/ifgraph.orig/files/pkg-install.in /usr/ports/net-mgmt/ifgraph/files/pkg-install.in --- /usr/ports/net-mgmt/ifgraph.orig/files/pkg-install.in 2010-01-24 19:51:29.000000000 +0100 +++ /usr/ports/net-mgmt/ifgraph/files/pkg-install.in 2010-07-02 17:31:06.306630031 +0200 @@ -6,34 +6,6 @@ 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:" --- ifgraph-0.4.10_3.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?cf2a0>