mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-25 00:51:21 +00:00
Use USERS
PR: ports/157597 Submitted by: crees (me) Reviewed by: rene (mentor, implicit), maintainer timeout (sem, 34 days)
This commit is contained in:
parent
d370880c74
commit
c32d99baaf
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=277406
@ -19,6 +19,8 @@ GNU_CONFIGURE= yes
|
||||
CONFIGURE_ARGS+= --with-ssl=${OPENSSLBASE} --with-ldns-builtin
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
USERS= ${PORTNAME}
|
||||
|
||||
USE_RC_SUBR= unbound
|
||||
|
||||
MAN1= unbound-host.1
|
||||
@ -29,8 +31,6 @@ MAN8= unbound.8 unbound-anchor.8 unbound-control.8 unbound-checkconf.8
|
||||
PORTDOCS= CREDITS Changelog FEATURES LICENSE README README.svn \
|
||||
README.tests TODO control_proto_spec.txt ietf67-design-02.odp \
|
||||
ietf67-design-02.pdf requirements.txt
|
||||
PKGINSTALL= ${WRKDIR}/pkg-install
|
||||
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
|
||||
SUB_FILES= pkg-install pkg-deinstall
|
||||
PLIST_SUB+= PYTHON=${PYTHON}
|
||||
|
||||
@ -84,9 +84,6 @@ post-patch:
|
||||
@${MKDIR} ${WRKSRC}/balancer
|
||||
@${RM} ${WRKSRC}/util/configlexer.c
|
||||
|
||||
pre-install:
|
||||
@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
||||
|
||||
post-install:
|
||||
@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
||||
.if !defined(NOPORTDOCS)
|
||||
|
@ -4,27 +4,10 @@
|
||||
#
|
||||
|
||||
PW=/usr/sbin/pw
|
||||
UID=59
|
||||
USER="unbound"
|
||||
PREFIX="%%PREFIX%%"
|
||||
|
||||
case $2 in
|
||||
|
||||
PRE-INSTALL)
|
||||
if ${PW} user show "${USER}" 2>/dev/null; then
|
||||
echo "You already have a user \"${USER}\", so I will use it."
|
||||
else
|
||||
if ${PW} useradd ${USER} -u ${UID} -g daemon -h - \
|
||||
-d "/nonexistent" -s /usr/sbin/nologin -c "unbound dns resolver"
|
||||
then
|
||||
echo "Added user \"${USER}\"."
|
||||
else
|
||||
echo "Adding user \"${USER}\" failed..."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
POST-INSTALL)
|
||||
chown "${USER}" $PREFIX/etc/unbound
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user