From fd80ab59bd35a46ddcd2c0acd20b129e46ef6b4e Mon Sep 17 00:00:00 2001 From: Chris Rees Date: Wed, 30 May 2012 19:51:31 +0000 Subject: [PATCH] Use USERS and GROUPS --- net-mgmt/netmond/Makefile | 13 +++---------- net-mgmt/netmond/pkg-deinstall | 19 ------------------- net-mgmt/netmond/pkg-install | 31 ------------------------------- 3 files changed, 3 insertions(+), 60 deletions(-) delete mode 100644 net-mgmt/netmond/pkg-deinstall delete mode 100644 net-mgmt/netmond/pkg-install diff --git a/net-mgmt/netmond/Makefile b/net-mgmt/netmond/Makefile index dd77c8a678da..1232007b9b34 100644 --- a/net-mgmt/netmond/Makefile +++ b/net-mgmt/netmond/Makefile @@ -22,6 +22,9 @@ PATCHFILES= ${DISTNAME}.patch${PATCH_VERSION}${EXTRACT_SUFX} ${DISTNAME}.docs${ MAINTAINER= ports@FreeBSD.org COMMENT= Netmond - IP network monitoring daemon +USERS= netmon +GROUPS= ${USERS} + #MK_IFGRAPH= yes PATCHDIR= ${WRKDIR}/patches @@ -56,16 +59,6 @@ post-extract: ${CP} ${PATCHDIR}/pipe.c ${WRKSRC} do-install: - @if pw user show netmon 2>/dev/null ; then \ - ${ECHO} "User 'netmon' exists." ; \ - else \ - pw useradd -n netmon -g wheel -c 'Network monitor account' -s /usr/sbin/nologin ; \ - fi - @if pw group show ${BINGRP} 2>/dev/null ; then \ - ${ECHO} "Group '${BINGRP}' exists." ; \ - else \ - pw groupadd ${BINGRP} -M root,netmon ; \ - fi ${INSTALL_PROGRAM} ${WRKSRC}/netmond ${PREFIX}/sbin/netmond .if defined(MK_IFGRAPH) ${INSTALL_PROGRAM} ${WRKSRC}/ifgraph ${PREFIX}/sbin/ifgraph diff --git a/net-mgmt/netmond/pkg-deinstall b/net-mgmt/netmond/pkg-deinstall deleted file mode 100644 index 5eccdad1914c..000000000000 --- a/net-mgmt/netmond/pkg-deinstall +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# -PKGNAME=$1 -# -case $2 in - DEINSTALL) - ;; - POST-DEINSTALL) - echo "" - echo "If you wish to remove this port from your computer complete," - echo "remove user 'netmon' and group 'netmon' manually." - echo "" - ;; - *) - echo "Unexpected Argument $2!!!" - exit 1 - ;; -esac -exit 0 diff --git a/net-mgmt/netmond/pkg-install b/net-mgmt/netmond/pkg-install deleted file mode 100644 index 007ffc6401b0..000000000000 --- a/net-mgmt/netmond/pkg-install +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# -PKGNAME=$1 -DATADIR=/var/netmon -# -case $2 in - PRE-INSTALL) - if pw user show netmon 2>/dev/null ; then - echo "User 'netmon' exists." ; - else - pw useradd -n netmon -g wheel -c 'Network monitor account' -s /usr/sbin/nologin ; - fi - if pw group show netmon 2>/dev/null ; then - echo "Group 'netmon' exists." ; - else - pw groupadd netmon -M root,netmon ; - fi - if [ ! -d ${DATADIR} ] ; then - mkdir ${DATADIR} - chown root:netmon ${DATADIR} - chmod 750 ${DATADIR} - fi - ;; - POST-INSTALL) - ;; - *) - echo "Unexpected Argument $2!!!" - exit 1 - ;; -esac -exit 0