- Replace INSTALL with @sample, @new(user|group), @exec and MESSAGE
- Kill DEINSTALL - Add WANTLIB marker - Bump PKGNAME ok sturm@
This commit is contained in:
parent
d49d9a3b0d
commit
36e99c9d8e
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.9 2003/06/22 14:07:21 sturm Exp $
|
||||
# $OpenBSD: Makefile,v 1.10 2004/12/01 19:59:59 alek Exp $
|
||||
# Uses pthreads
|
||||
|
||||
COMMENT= "threaded DNS daemon, optimized for caching"
|
||||
@ -8,7 +8,7 @@ COMMENT= "threaded DNS daemon, optimized for caching"
|
||||
ONLY_FOR_ARCHS= i386
|
||||
|
||||
DISTNAME= pdnsd-1.1.7a
|
||||
PKGNAME= ${DISTNAME}p0
|
||||
PKGNAME= ${DISTNAME}p1
|
||||
CATEGORIES= net
|
||||
HOMEPAGE= http://home.t-online.de/home/Moestl/
|
||||
|
||||
@ -17,6 +17,7 @@ PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
WANTLIB= c pthread
|
||||
|
||||
MASTER_SITES= ${HOMEPAGE}
|
||||
|
||||
|
@ -1,53 +0,0 @@
|
||||
#!/bin/sh
|
||||
# $OpenBSD: DEINSTALL,v 1.4 2004/09/15 18:17:44 espie Exp $
|
||||
#
|
||||
# De-installation setup of pdnsd
|
||||
|
||||
# exit on errors, use a sane path and install prefix
|
||||
#
|
||||
set -e
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
PREFIX=${PKG_PREFIX:-/usr/local}
|
||||
CONFIG_FILE=${SYSCONFDIR}/pdnsd.conf
|
||||
|
||||
# Function: tell the user what they need to do to delete the port completely
|
||||
#
|
||||
do_notice()
|
||||
{
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| To completely deinstall the $1 package you need to perform"
|
||||
echo "| these steps as root:"
|
||||
echo "|"
|
||||
echo "| userdel _pdnsd"
|
||||
echo "| rm -rf /var/pdnsd"
|
||||
echo "| rm -f /var/run/pdnsd.pid"
|
||||
echo "|"
|
||||
echo "| Do not do this if you plan on re-installing $1"
|
||||
echo "| at some future time."
|
||||
echo "+---------------"
|
||||
echo
|
||||
}
|
||||
|
||||
# Verify proper execution
|
||||
#
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "usage: $0 distname DEINSTALL" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Verify/process the command
|
||||
#
|
||||
case $2 in
|
||||
DEINSTALL)
|
||||
if [ ${PKG_DELETE_EXTRA} != Yes -a -f ${CONFIG_FILE} ]; then
|
||||
do_notice "$1"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 distname DEINSTALL" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
@ -1,129 +0,0 @@
|
||||
#!/bin/sh
|
||||
# $OpenBSD: INSTALL,v 1.5 2004/09/15 18:17:44 espie Exp $
|
||||
#
|
||||
# Pre/post-installation setup of pdnsd
|
||||
|
||||
# don't "set -e" to exit on errors, as do_add_user() needs this
|
||||
# use a sane path and install prefix
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
PREFIX=${PKG_PREFIX:-/usr/local}
|
||||
CONFIG_DIR=${SYSCONFDIR}
|
||||
SAMPLE_CONFIG_DIR=$PREFIX/share/examples/pdnsd
|
||||
CACHE_DIR=/var/pdnsd
|
||||
PDNSD=_pdnsd
|
||||
ID=510
|
||||
|
||||
# Function: user "pdnsd" is not available
|
||||
#
|
||||
do_add_user()
|
||||
{
|
||||
groupinfo -e ${PDNSD}
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "===> Using existing group '${PDNSD}'"
|
||||
else
|
||||
echo "===> Creating group '${PDNSD}'"
|
||||
groupadd -g ${ID} ${PDNSD}
|
||||
fi
|
||||
|
||||
userinfo -e ${PDNSD}
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "===> Using existing account '${PDNSD}'"
|
||||
else
|
||||
echo "===> Creating user '${PDNSD}'"
|
||||
useradd -g ${PDNSD} \
|
||||
-c "Proxy DNS Server" \
|
||||
-d /nonexistent \
|
||||
-s /sbin/nologin \
|
||||
-u ${ID} ${PDNSD}
|
||||
fi
|
||||
}
|
||||
|
||||
# Function: install configuration files
|
||||
#
|
||||
do_install_conf()
|
||||
{
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| You may want to put the following in /etc/rc.local:"
|
||||
echo "|"
|
||||
echo "| if [ -x /usr/local/sbin/pdnsd ]; then"
|
||||
echo "| echo -n ' pdnsd'; /usr/local/sbin/pdnsd -4 -s -d -p /var/run/pdnsd.pid"
|
||||
echo "| fi"
|
||||
echo "+---------------"
|
||||
}
|
||||
|
||||
# Function: install cache dir
|
||||
#
|
||||
do_install_cachedir()
|
||||
{
|
||||
install -d -o ${PDNSD} -g ${PDNSD} ${CACHE_DIR}
|
||||
dd if=/dev/zero of=${CACHE_DIR}/pdnsd.cache bs=1 count=4 2>/dev/null
|
||||
chown ${PDNSD}:${PDNSD} ${CACHE_DIR}/pdnsd.cache
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| The $1 caching directory has been installed in ${CACHE_DIR}."
|
||||
echo "+---------------"
|
||||
}
|
||||
|
||||
# Function: tell the user what they need to do to use the port just installed
|
||||
#
|
||||
do_notice_conf()
|
||||
{
|
||||
}
|
||||
|
||||
# Function: tell the user what they need to do to use the port just installed
|
||||
#
|
||||
do_notice_cachedir()
|
||||
{
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| The caching directory ${CACHE_DIR} has not been touched."
|
||||
echo "+---------------"
|
||||
}
|
||||
|
||||
# Function: inform user where documentation has been installed
|
||||
#
|
||||
do_notice_docs()
|
||||
{
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| Documentation files for $1 have been copied to"
|
||||
echo "| ${PREFIX}/share/doc/pdnsd"
|
||||
echo "+---------------"
|
||||
}
|
||||
|
||||
# Verify proper execution
|
||||
#
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Verify/process the command
|
||||
#
|
||||
case $2 in
|
||||
PRE-INSTALL)
|
||||
do_add_user "$1"
|
||||
;;
|
||||
POST-INSTALL)
|
||||
if [ ! -d ${CONFIG_DIR} ]; then
|
||||
do_install_conf "$1"
|
||||
elif [ ! -f ${CONFIG_DIR}/pdnsd.conf ]; then
|
||||
do_install_conf "$1"
|
||||
else
|
||||
do_notice_conf "$1"
|
||||
fi
|
||||
if [ ! -d ${CACHE_DIR} ]; then
|
||||
do_install_cachedir "$1"
|
||||
else
|
||||
do_notice_cachedir "$1"
|
||||
fi
|
||||
do_notice_docs "$1"
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
6
net/pdnsd/pkg/MESSAGE
Normal file
6
net/pdnsd/pkg/MESSAGE
Normal file
@ -0,0 +1,6 @@
|
||||
You may want to put the following in /etc/rc.local:
|
||||
|
||||
if [ -x ${PREFIX}/sbin/pdnsd ]; then
|
||||
echo -n ' pdnsd';
|
||||
${PREFIX}/sbin/pdnsd -4 -s -d -p /var/run/pdnsd.pid
|
||||
fi
|
@ -1,4 +1,6 @@
|
||||
@comment $OpenBSD: PLIST,v 1.3 2004/09/15 18:17:44 espie Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.4 2004/12/01 19:59:59 alek Exp $
|
||||
@newgroup _pdnsd:510
|
||||
@newuser _pdnsd:510:_pdnsd:daemon:Proxy DNS Server:/nonexistent:/sbin/nologin
|
||||
@man man/man8/pdnsd-ctl.8
|
||||
sbin/pdnsd
|
||||
sbin/pdnsd-ctl
|
||||
@ -9,6 +11,9 @@ share/doc/pdnsd/manual.txt
|
||||
share/examples/pdnsd/
|
||||
share/examples/pdnsd/pdnsd.conf
|
||||
@sample ${SYSCONFDIR}/pdnsd.conf
|
||||
@owner _pdnsd
|
||||
@group _pdnsd
|
||||
@sample /var/pdnsd/
|
||||
@exec dd if=/dev/zero of=/var/pdnsd/pdnsd.cache bs=1 count=4 2>/dev/null
|
||||
@exec chown _pdnsd:_pdnsd /var/pdnsd/pdnsd.cache
|
||||
@extraunexec rm -rf /var/pdnsd
|
||||
@extraunexec userdel _pdnsd
|
||||
@extraunexec groupdel _pdnsd
|
||||
|
Loading…
Reference in New Issue
Block a user