diff options
author | Antoine Brodin <antoine@FreeBSD.org> | 2014-09-25 20:24:41 +0000 |
---|---|---|
committer | Antoine Brodin <antoine@FreeBSD.org> | 2014-09-25 20:24:41 +0000 |
commit | fa8b34d548e55179c98a1f3d8f89e60ca8e6cb9c (patch) | |
tree | d065befec6fd701fc24c5246e099888549ac1897 /net-mgmt | |
parent | 42d4e1b7c0308f6b491700adaaae065cb2fc2ced (diff) |
- Use ports framework to create iog user
- Bump portrevision as both configuration file and sample configuration file
were packaged
Notes
Notes:
svn path=/head/; revision=369292
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/iog/Makefile | 12 | ||||
-rw-r--r-- | net-mgmt/iog/pkg-install | 24 | ||||
-rw-r--r-- | net-mgmt/iog/pkg-plist | 4 |
3 files changed, 5 insertions, 35 deletions
diff --git a/net-mgmt/iog/Makefile b/net-mgmt/iog/Makefile index 11f58e63fc62..0eb29c1f7888 100644 --- a/net-mgmt/iog/Makefile +++ b/net-mgmt/iog/Makefile @@ -3,7 +3,7 @@ PORTNAME= iog PORTVERSION= 1.03 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net-mgmt MASTER_SITES= http://www.dynw.com/iog/ @@ -13,19 +13,15 @@ COMMENT= Graphs Byte Counts for switches/routers/etc NO_BUILD= yes USES= perl5 tar:tgz PLIST_SUB= VERSION=${PORTVERSION} -IOG_USER= iog -IOG_GROUP= www +USERS= iog IOGDIR= ${PREFIX}/iog/iog-${PORTVERSION} do-install: - PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL + ${FIND} ${WRKSRC} -name '*.bak' -or -name '*.orig' -delete ${MKDIR} -m 755 ${STAGEDIR}${IOGDIR} - ${CHMOD} 0600 ${WRKSRC}/iog.cfg - ${CP} ${WRKSRC}/iog.cfg ${WRKSRC}/iog.cfg.sample + ${INSTALL} ${COPY} -m 0600 ${WRKSRC}/iog.cfg ${WRKSRC}/iog.cfg.sample ${CP} -R ${WRKSRC}/* ${STAGEDIR}${IOGDIR} - ${CP} ${STAGEDIR}${IOGDIR}/iog.cfg.sample ${STAGEDIR}${IOGDIR}/iog.cfg - ${FIND} ${STAGEDIR}${IOGDIR} -name '*.bak' -or -name '*.orig' -delete ${LN} -sf ${IOGDIR} ${STAGEDIR}${PREFIX}/iog/iog .include <bsd.port.mk> diff --git a/net-mgmt/iog/pkg-install b/net-mgmt/iog/pkg-install deleted file mode 100644 index ce43dfee9316..000000000000 --- a/net-mgmt/iog/pkg-install +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# $FreeBSD$ -# - -if [ "$2" != "PRE-INSTALL" ]; then - exit 0 -fi - -USER=iog -# group selected to be www since the webserver has to be able to serve it -GROUP=www - -if ! pw usershow "${USER}" 2>/dev/null 1>&2; then - if pw useradd ${USER} -g ${GROUP} -h - \ - -s "/sbin/nologin" -d "${PREFIX}/iog" \ - -c "iog Monitoring Owner"; \ - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi -fi -exit 0 diff --git a/net-mgmt/iog/pkg-plist b/net-mgmt/iog/pkg-plist index b45efbad5b06..254d5e9fc61a 100644 --- a/net-mgmt/iog/pkg-plist +++ b/net-mgmt/iog/pkg-plist @@ -9,11 +9,9 @@ iog/iog-%%VERSION%%/howto-iog.html iog/iog-%%VERSION%%/in.gif iog/iog-%%VERSION%%/index.php iog/iog-%%VERSION%%/iog -iog/iog-%%VERSION%%/iog.cfg @sample iog/iog-%%VERSION%%/iog.cfg.sample iog/iog-%%VERSION%%/ioglogo.gif iog/iog-%%VERSION%%/out.gif -@dirrmtry iog/iog-%%VERSION%% -@dirrmtry iog +@dir iog/iog-%%VERSION%% @owner @group |