don't hardcode /etc but use SYSCONFDIR

This commit is contained in:
sturm 2003-04-26 14:55:32 +00:00
parent 7e4e648082
commit 62ec5c8d04
26 changed files with 102 additions and 71 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.11 2003/02/06 20:47:48 brad Exp $
# $OpenBSD: Makefile,v 1.12 2003/04/26 14:55:32 sturm Exp $
COMMENT= "mailing list manager"
@ -25,7 +25,7 @@ EXTRACT_SUFX= .tgz
ALL_TARGET= wrapper
MAKE_FLAGS+= W_HOME=${PREFIX}/lib/majordomo \
W_PATH=/bin:/usr/bin \
W_MAJORDOMO_CFDIR=/etc/majordomo \
W_MAJORDOMO_CFDIR=${SYSCONFDIR}/majordomo \
W_MAJORDOMO_CF=majordomo.cf \
POSIX=""
@ -58,5 +58,7 @@ post-install:
@${INSTALL_DATA} ${WRKSRC}/Doc/majordomo.lisa6.ps ${DOCDIR}
@${INSTALL_DATA} ${WRKSRC}/Doc/majordomo.ora ${DOCDIR}
@${INSTALL_DATA} ${FILESDIR}/post-install-notes ${DOCDIR}
@perl -pi -e "s,%%SYSCONFDIR%%,${SYSCONFDIR}," \
${DOCDIR}/post-install-notes
.include <bsd.port.mk>

View File

@ -9,7 +9,7 @@ manually:
- read README, FAQ and NEWLIST in /usr/local/share/doc/majordomo
- review /etc/majordomo/majordomo.cf
- review %%SYSCONFDIR%%/majordomo/majordomo.cf
- make 'majordom' a trusted sendmail user so it can use
parameter -f (changing the from address) without causing

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $OpenBSD: DEINSTALL,v 1.1 2001/01/21 23:35:01 danh Exp $
# $OpenBSD: DEINSTALL,v 1.2 2003/04/26 14:55:32 sturm Exp $
#
# De-installation setup of majordomo
@ -18,7 +18,7 @@ do_notice()
echo "| To completely deinstall the $1 package you need to perform"
echo "| these steps as root:"
echo "|"
echo "| rm -rf /etc/majordomo/"
echo "| rm -rf ${SYSCONFDIR}/majordomo/"
echo "| rm -rf /var/spool/majordomo/"
echo "| rmuser majordom"
echo "| rmgroup majordom"

View File

@ -1,11 +1,12 @@
#! /bin/sh
# $OpenBSD: INSTALL,v 1.4 2003/04/14 15:02:09 wilfried Exp $
# $OpenBSD: INSTALL,v 1.5 2003/04/26 14:55:32 sturm Exp $
#
# Pre/post-installation setup of majordomo
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIGDIR=${SYSCONFDIR}/majordomo
do_create_user()
{
@ -58,18 +59,18 @@ do_set_file_permissions()
do_install_configuration()
{
echo -n "Let's see if there is already a configuration file... "
if [ -d /etc/majordomo -a -f /etc/majordomo/majordomo.cf ]; then
if [ -d ${CONFIGDIR} -a -f ${CONFIGDIR}/majordomo.cf ]; then
echo "yes"
echo "Please compare your existing configuration with"
echo "${PREFIX}/lib/majordomo/sample.cf"
else
echo "no"
echo -n "Copying sample configuration file... "
mkdir /etc/majordomo
chmod 755 /etc/majordomo
sed -e "s/example.com/$(hostname)/" ${PREFIX}/lib/majordomo/sample.cf > /etc/majordomo/majordomo.cf
mkdir ${CONFIGDIR}
chmod 755 ${CONFIGDIR}
sed -e "s/example.com/$(hostname)/" ${PREFIX}/lib/majordomo/sample.cf > ${CONFIGDIR}/majordomo.cf
echo "ok"
echo "Please review new configuration /etc/majordomo/majordomo.cf"
echo "Please review new configuration ${CONFIGDIR}/majordomo.cf"
fi
}

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.17 2002/10/27 17:21:39 naddy Exp $
# $OpenBSD: Makefile,v 1.18 2003/04/26 14:55:32 sturm Exp $
COMMENT= "MIME implementation"
@ -18,6 +18,9 @@ WRKDIST= ${WRKDIR}/${DISTNAME}/src
NO_REGRESS= Yes
post-patch:
@perl -pi -e "s,%%SYSCONFDIR%%,${SYSCONFDIR}," ${WRKSRC}/config.h
pre-install:
@cd ${WRKSRC}/bin && rm -f *.orig

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-config_h,v 1.1 2002/02/20 21:18:02 pvalchev Exp $
--- config.h.orig Wed Nov 24 08:36:07 1993
+++ config.h Wed Feb 20 14:06:43 2002
$OpenBSD: patch-config_h,v 1.2 2003/04/26 14:55:32 sturm Exp $
--- config.h.orig Wed Nov 24 16:36:07 1993
+++ config.h Thu Apr 24 22:06:39 2003
@@ -73,7 +73,7 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIE
#ifdef SYSV
#define RESET_PROGRAM "tput clear"
@ -10,7 +10,7 @@ $OpenBSD: patch-config_h,v 1.1 2002/02/20 21:18:02 pvalchev Exp $
#define RESET_PROGRAM "/usr/bin/reset"
#else
#define RESET_PROGRAM "/usr/ucb/reset"
@@ -155,7 +155,11 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIE
@@ -155,9 +155,13 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIE
#ifdef NeXT
#define sigtype void
#else
@ -18,7 +18,18 @@ $OpenBSD: patch-config_h,v 1.1 2002/02/20 21:18:02 pvalchev Exp $
+#define sigtype void
+#else
#define sigtype int
#endif
#endif
+#endif
#endif
#endif
#ifdef MSDOS
#define PATH_SEPARATOR ';'
@@ -173,7 +177,7 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIE
#else
#define PATH_SEPARATOR ':'
#ifndef STDPATH
-#define STDPATH "/.mailcap:/usr/local/etc/mailcap:/usr/etc/mailcap:/etc/mailcap:/etc/mail/mailcap:/usr/public/lib/mailcap"
+#define STDPATH "/.mailcap:%%SYSCONFDIR%%/mailcap:/etc/mail/mailcap"
#endif
#endif
#endif

View File

@ -1,12 +1,12 @@
#!/bin/sh
# $OpenBSD: DEINSTALL,v 1.2 2000/07/19 09:31:20 brad Exp $
# $OpenBSD: DEINSTALL,v 1.3 2003/04/26 14:55:32 sturm Exp $
#
# metamail de-installation
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
MAILCAP=/etc/mailcap
MAILCAP=${SYSCONFDIR}/mailcap
if [ -f ${MAILCAP} ]; then
echo

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $OpenBSD: INSTALL,v 1.1 1999/04/08 22:41:17 marc Exp $
# $OpenBSD: INSTALL,v 1.2 2003/04/26 14:55:32 sturm Exp $
#
# Pre/post-installation setup for metamail
@ -8,7 +8,7 @@
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
MAILCAP=/etc/mailcap
MAILCAP=${SYSCONFDIR}/mailcap
# Function: tell the user what s/he needs to do to use the port just installed
@ -25,11 +25,11 @@ do_notice()
echo
}
# Function: copy the metamail mailcap to /etc
# Function: copy the metamail mailcap to ${SYSCONFDIR}
#
do_install()
{
cp ${PREFIX}/lib/metamail/mailcap /etc
cp ${PREFIX}/lib/metamail/mailcap ${SYSCONFDIR}
echo
echo "+---------------"
echo "| The file ${MAILCAP} has been created on your system."

View File

@ -1,12 +1,12 @@
#!/bin/sh
# $OpenBSD: DEINSTALL,v 1.2 2000/07/19 09:31:21 brad Exp $
# $OpenBSD: DEINSTALL,v 1.3 2003/04/26 14:55:32 sturm Exp $
#
# ipfm de-installation
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_FILE=/etc/ipfm.conf
CONFIG_FILE=${SYSCONFDIR}/ipfm.conf
LOG_DIR=/var/log/ipfm
if [ -f ${CONFIG_FILE} -o -d ${LOG_DIR} ]; then

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $OpenBSD: INSTALL,v 1.1.1.1 2000/06/23 18:44:42 form Exp $
# $OpenBSD: INSTALL,v 1.2 2003/04/26 14:55:32 sturm Exp $
#
# Pre/post-installation setup of ipfm
@ -8,7 +8,7 @@
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_FILE=/etc/ipfm.conf
CONFIG_FILE=${SYSCONFDIR}/ipfm.conf
SAMPLE_CONFIG_FILE=${PREFIX}/share/examples/ipfm/ipfm.conf.sample
# Function: tell the user what s/he needs to do to use the port just installed

View File

@ -1,12 +1,12 @@
#!/bin/sh
# $OpenBSD: DEINSTALL,v 1.2 2000/07/19 09:31:21 brad Exp $
# $OpenBSD: DEINSTALL,v 1.3 2003/04/26 14:55:32 sturm Exp $
#
# proxy-suite de-installation
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_DIR=/etc/proxy-suite
CONFIG_DIR=${SYSCONFDIR}/proxy-suite
if [ -f ${CONFIG_FILE} ]; then
echo

View File

@ -1,12 +1,12 @@
#!/bin/sh
# $OpenBSD: INSTALL,v 1.3 2002/04/26 03:35:34 pvalchev Exp $
# $OpenBSD: INSTALL,v 1.4 2003/04/26 14:55:32 sturm Exp $
#
# Pre/post-installation setup of proxy-suite
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PREFIX:-/usr/local}
CONFIG_DIR=/etc/proxy-suite
CONFIG_DIR=${SYSCONFDIR}/proxy-suite
CONFIG_FILE=${CONFIG_DIR}/ftp-proxy.conf
SAMPLE_FILE=${PREFIX}/share/proxy-suite/ftp-proxy.conf.sample

View File

@ -1,12 +1,12 @@
#!/bin/sh
# $OpenBSD: DEINSTALL,v 1.2 2000/07/19 09:31:22 brad Exp $
# $OpenBSD: DEINSTALL,v 1.3 2003/04/26 14:55:32 sturm Exp $
#
# queso de-installation
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_FILE=/etc/queso.conf
CONFIG_FILE=${SYSCONFDIR}/queso.conf
if [ -f ${CONFIG_FILE} ]; then
echo

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $OpenBSD: INSTALL,v 1.2 2002/04/26 03:35:34 pvalchev Exp $
# $OpenBSD: INSTALL,v 1.3 2003/04/26 14:55:32 sturm Exp $
#
# Pre/post-installation setup of queso
@ -8,7 +8,7 @@
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_FILE=/etc/queso.conf
CONFIG_FILE=${SYSCONFDIR}/queso.conf
# Function: tell the user what s/he needs to do to use the port just installed
#

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $OpenBSD: DEINSTALL,v 1.1 2000/06/11 01:15:53 fgsch Exp $
# $OpenBSD: DEINSTALL,v 1.2 2003/04/26 14:55:32 sturm Exp $
#
# Post-deinstallation cleanup of totd
@ -7,7 +7,7 @@ echo ""
echo "** To completely deinstall the totd package you need to perform this"
echo "** as root:"
echo "**"
echo "** rm -f /etc/totd.conf"
echo "** rm -f ${SYSCONFDIR}/totd.conf"
echo "**"
echo "** Be absolutly sure you want to completely remove the package before"
echo "** issuing this command."

View File

@ -1,5 +1,5 @@
#! /bin/sh
# $OpenBSD: INSTALL,v 1.1 2000/06/11 01:15:53 fgsch Exp $
# $OpenBSD: INSTALL,v 1.2 2003/04/26 14:55:32 sturm Exp $
#
# Post-installation setup of totd - based on majordomo INSTALL script
# from daniel@reichardt.ch
@ -7,11 +7,12 @@
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_FILE=${SYSCONFDIR}/totd.conf
do_install_configuration()
{
echo -n "Let's see if there is already a configuration file... "
if [ -f /etc/totd.conf ]; then
if [ -f ${CONFIG_FILE} ]; then
echo "yes"
echo "Please compare your existing configuration with"
echo "${PREFIX}/share/totd/totd.conf.sample"
@ -19,9 +20,9 @@ do_install_configuration()
echo "no"
echo -n "Copying sample configuration file... "
install -o root -g wheel -m 644 ${PREFIX}/share/totd/totd.conf.sample \
/etc/totd.conf
${CONFIG_FILE}
echo "ok"
echo "Please review new configuration /etc/totd.conf"
echo "Please review new configuration ${CONFIG_FILE}"
fi
}

View File

@ -1,13 +1,13 @@
#!/bin/sh
# $OpenBSD: DEINSTALL,v 1.1 2000/06/11 01:13:43 weingart Exp $
# $OpenBSD: DEINSTALL,v 1.2 2003/04/26 14:55:32 sturm Exp $
#
# a2ps de-installation
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
A2PSCFG=/etc/a2ps.cfg
A2PSSITECFG=/etc/a2ps-site.cfg
A2PSCFG=${SYSCONFDIR}/a2ps.cfg
A2PSSITECFG=${SYSCONFDIR}/a2ps-site.cfg
if [ -e ${A2PSCFG} ]; then
echo

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $OpenBSD: INSTALL,v 1.1 2000/06/11 01:13:43 weingart Exp $
# $OpenBSD: INSTALL,v 1.2 2003/04/26 14:55:32 sturm Exp $
#
# Pre/post-installation setup of a2ps
@ -8,8 +8,8 @@
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
A2PSCFG=/etc/a2ps.cfg
A2PSSITECFG=/etc/a2ps-site.cfg
A2PSCFG=${SYSCONFDIR}/a2ps.cfg
A2PSSITECFG=${SYSCONFDIR}/a2ps-site.cfg
# Function: tell the user what s/he needs to do to use the port just installed
#
@ -30,8 +30,8 @@ do_notice()
#
do_install()
{
cp ${PREFIX}/share/a2ps/etc/a2ps.cfg /etc
cp ${PREFIX}/share/a2ps/etc/a2ps-site.cfg /etc
cp ${PREFIX}/share/a2ps/etc/a2ps.cfg ${SYSCONFDIR}
cp ${PREFIX}/share/a2ps/etc/a2ps-site.cfg ${SYSCONFDIR}
echo
echo "+---------------"
echo "| The files ${A2PSCFG} and ${A2PSSITECFG} have been created"

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $OpenBSD: DEINSTALL,v 1.2 1999/04/10 07:14:56 marc Exp $
# $OpenBSD: DEINSTALL,v 1.3 2003/04/26 14:55:32 sturm Exp $
#
# Pre/post-uninstallation setup of enscript
@ -8,7 +8,7 @@ echo "+---------------"
echo "| To completely deinstall the enscript package you need to perform"
echo "| this steps as root:"
echo "|"
echo "| rm -f /etc/enscript.cfg"
echo "| rm -f ${SYSCONFDIR}/enscript.cfg"
echo "+---------------"
echo

View File

@ -1,12 +1,12 @@
#!/bin/sh
# $OpenBSD: INSTALL,v 1.4 2000/07/30 20:03:31 matt Exp $
# $OpenBSD: INSTALL,v 1.5 2003/04/26 14:55:32 sturm Exp $
#
# Pre/post-installation setup of enscript
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PREFIX:-/usr/local}
CONFIG_FILE=/etc/enscript.cfg
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_FILE=${SYSCONFDIR}/enscript.cfg
CONFIG_SAMPLE=${PREFIX}/share/examples/enscript/enscript.cfg-sample
if [ $# -ne 2 ]; then

View File

@ -1,5 +1,5 @@
# $FreeBSD: ports/russian/cyrproxy/Makefile,v 1.4 1999/08/31 01:46:57 peter Exp $
# $OpenBSD: Makefile,v 1.13 2002/10/28 14:26:31 naddy Exp $
# $OpenBSD: Makefile,v 1.14 2003/04/26 14:55:32 sturm Exp $
COMMENT= "cyrillic proxy for network protocols"
@ -15,6 +15,9 @@ PERMIT_DISTFILES_FTP= Yes
NO_REGRESS= Yes
post-patch:
@perl -pi -e "s,%%SYSCONFDIR%%,${SYSCONFDIR}," ${WRKSRC}/Makefile
do-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/cyrproxy
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/cyrproxy

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-Makefile,v 1.1 2001/11/27 10:06:50 form Exp $
--- Makefile.orig Fri Feb 9 04:33:53 2001
+++ Makefile Tue Nov 27 15:53:47 2001
$OpenBSD: patch-Makefile,v 1.2 2003/04/26 14:55:32 sturm Exp $
--- Makefile.orig Thu Feb 8 23:33:53 2001
+++ Makefile Sat Apr 26 14:10:35 2003
@@ -6,9 +6,9 @@
CHMOD=/bin/chmod
@ -14,6 +14,15 @@ $OpenBSD: patch-Makefile,v 1.1 2001/11/27 10:06:50 form Exp $
# Some systems contains resolver routines in libresolv
# EXTRALIBS=lresolv
EXTRALIBS=
@@ -34,7 +34,7 @@ SPY=tcpspy
TBLDIR=/usr/local/share/proxy
# config file location
-CONF_FILE=/etc/cyrproxy.conf
+CONF_FILE=%%SYSCONFDIR%%/cyrproxy.conf
# Subdirs for make
# cyrcoder - filter-like cyrillic recoder
@@ -65,7 +65,7 @@ all: ${CYRPROXY} ${SPY} subdirmake confi

View File

@ -1,12 +1,12 @@
#!/bin/sh
# $OpenBSD: DEINSTALL,v 1.2 2000/07/19 08:01:01 brad Exp $
# $OpenBSD: DEINSTALL,v 1.3 2003/04/26 14:55:32 sturm Exp $
#
# cyrproxy de-installation
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_FILE=/etc/cyrproxy.conf
CONFIG_FILE=${SYSCONFDIR}/cyrproxy.conf
CGIDIR=/var/www/cgi-bin
if [ -f ${CONFIG_FILE} ]; then

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $OpenBSD: INSTALL,v 1.1.1.1 2000/01/26 07:35:50 form Exp $
# $OpenBSD: INSTALL,v 1.2 2003/04/26 14:55:32 sturm Exp $
#
# Pre/post-installation setup of cyrproxy
@ -8,7 +8,7 @@
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_FILE=/etc/cyrproxy.conf
CONFIG_FILE=${SYSCONFDIR}/cyrproxy.conf
SAMPLE_CONFIG_FILE=${PREFIX}/share/cyrproxy/cyrproxy.conf.sample
CGIDIR=/var/www/cgi-bin

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $OpenBSD: DEINSTALL,v 1.2 2002/05/25 10:38:58 reinhard Exp $
# $OpenBSD: DEINSTALL,v 1.3 2003/04/26 14:55:32 sturm Exp $
#
# Nessus de-installation
@ -11,7 +11,7 @@ cat <<EOT
+---------------
| To completely deinstall the $1 package, you need to manually
| delete /etc/nessus and /var/nessus.
| delete ${SYSCONFDIR}/nessus and /var/nessus.
|
| Do not do this if you plan on re-installing $1
| at some future time.

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $OpenBSD: INSTALL,v 1.3 2002/05/25 10:38:58 reinhard Exp $
# $OpenBSD: INSTALL,v 1.4 2003/04/26 14:55:32 sturm Exp $
#
# Post-installation script for nessus port
#
@ -8,25 +8,26 @@
set -e
PATH=/bin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIGDIR=${SYSCONFDIR}/nessus
umask 022
if [ x$2 = xPOST-INSTALL ]
then
# See if /etc/nessus exists; if it doesn't, create and populate.
if [ -d /etc/nessus ]
# See if ${CONFIGDIR} exists; if it doesn't, create and populate.
if [ -d ${CONFIGDIR} ]
then
cat <<EOT
+---------------
| Example configuration files have been copied to
| $PREFIX/share/examples/nessus. Your existing /etc/nessus has
| $PREFIX/share/examples/nessus. Your existing ${CONFIGDIR} has
| been left untouched.
+---------------
EOT
else
mkdir -p /etc/nessus
cp -R $PREFIX/share/examples/nessus/* /etc/nessus/
mkdir -p ${CONFIGDIR}
cp -R $PREFIX/share/examples/nessus/* ${CONFIGDIR}
fi
# Make /var/nessus directory for logs and pidfile and etc.