aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2018-04-05 16:37:19 +0000
committerMark Felder <feld@FreeBSD.org>2018-04-05 16:37:19 +0000
commitc439b9df7386853c071481737e0fde190f0038b8 (patch)
treeaa71b5b11ca35eae630e0a29c92ada3fd7ed056c /net-mgmt
parent23a8be9f536504a89fb35af7ce553bda1043ef66 (diff)
downloadports-c439b9df7386853c071481737e0fde190f0038b8.tar.gz
ports-c439b9df7386853c071481737e0fde190f0038b8.zip
Notes
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/py-pdagent/Makefile4
-rw-r--r--net-mgmt/py-pdagent/files/pdagentd.in14
-rw-r--r--net-mgmt/py-pdagent/pkg-message6
3 files changed, 16 insertions, 8 deletions
diff --git a/net-mgmt/py-pdagent/Makefile b/net-mgmt/py-pdagent/Makefile
index b9ff149dfa00..291ea6cc3160 100644
--- a/net-mgmt/py-pdagent/Makefile
+++ b/net-mgmt/py-pdagent/Makefile
@@ -4,6 +4,7 @@
PORTNAME= pdagent
PORTVERSION= 1.4
DISTVERSIONPREFIX=v
+PORTREVISION= 1
CATEGORIES= net-mgmt python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -26,6 +27,9 @@ SUB_LIST+= PYTHON_CMD="${PYTHON_CMD}"
BINFILES= pd-queue pd-send pdagentd.py
+USERS= pdagent
+GROUPS= pdagent
+
do-patch:
${REINPLACE_CMD} -e 's|/var/lib/pdagent|/var/db/pdagent|' -e 's|/etc|${ETCDIR}|' ${WRKSRC}/pdagent/confdirs.py
diff --git a/net-mgmt/py-pdagent/files/pdagentd.in b/net-mgmt/py-pdagent/files/pdagentd.in
index a33879d0cdfa..2865a97cf940 100644
--- a/net-mgmt/py-pdagent/files/pdagentd.in
+++ b/net-mgmt/py-pdagent/files/pdagentd.in
@@ -20,8 +20,8 @@ rcvar=pdagentd_enable
load_rc_config $name
: ${pdagentd_enable="NO"}
-: ${pdagentd_user:="nobody"}
-: ${pdagentd_group:="nogroup"}
+: ${pdagentd_user:="pdagent"}
+: ${pdagentd_group:="pdagent"}
pidfile="/var/run/pdagent/pdagentd.pid"
command="%%PREFIX%%/bin/pdagentd.py"
@@ -37,12 +37,10 @@ pdagentd_precmd()
install -d -o ${pdagentd_user} -g ${pdagentd_group} -m 775 ${i}
done
- if [ ! -d /var/log/pdagent ]; then
- install -d -o ${pdagentd_user} /var/log/pdagent
- fi
- if [ ! -d /var/run/pdagent ]; then
- install -d -o ${pdagentd_user} /var/run/pdagent
- fi
+ chown -R ${pdagentd_user}:${pdagentd_group} /var/db/pdagent
+
+ install -d -o ${pdagentd_user} /var/log/pdagent
+ install -d -o ${pdagentd_user} /var/run/pdagent
}
run_rc_command "$1"
diff --git a/net-mgmt/py-pdagent/pkg-message b/net-mgmt/py-pdagent/pkg-message
new file mode 100644
index 000000000000..bbd05924630a
--- /dev/null
+++ b/net-mgmt/py-pdagent/pkg-message
@@ -0,0 +1,6 @@
+!!! NOTICE !!!
+
+You must add the required users and service accounts to the pdagent
+group to permit write access to /var/db/pdagent.
+
+!!! NOTICE !!!