aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Lehmann <oliver@FreeBSD.org>2005-03-15 19:41:41 +0000
committerOliver Lehmann <oliver@FreeBSD.org>2005-03-15 19:41:41 +0000
commit10eea892ddb3b6ebdb06833bfc950d02c6635c48 (patch)
tree61c394acdd9c61261f5eed70ec286dc9dd184ba0
parent15f66ab5b1a3efd90bad9f4fad3f74355cbf9601 (diff)
downloadports-10eea892ddb3b6ebdb06833bfc950d02c6635c48.tar.gz
ports-10eea892ddb3b6ebdb06833bfc950d02c6635c48.zip
Notes
-rw-r--r--databases/courier-authlib-mysql/Makefile6
-rw-r--r--databases/courier-authlib-mysql/files/courier-authdaemond.sh16
-rw-r--r--databases/courier-authlib-mysql/pkg-plist2
-rw-r--r--databases/courier-authlib-pgsql/Makefile6
-rw-r--r--databases/courier-authlib-pgsql/files/courier-authdaemond.sh16
-rw-r--r--databases/courier-authlib-pgsql/pkg-plist2
-rw-r--r--databases/courier-authlib-userdb/Makefile6
-rw-r--r--databases/courier-authlib-userdb/files/courier-authdaemond.sh16
-rw-r--r--databases/courier-authlib-userdb/pkg-plist2
-rw-r--r--databases/courier-authlib-usergdbm/Makefile6
-rw-r--r--databases/courier-authlib-usergdbm/files/courier-authdaemond.sh16
-rw-r--r--databases/courier-authlib-usergdbm/pkg-plist2
-rw-r--r--mail/courier-authlib-vchkpw/Makefile6
-rw-r--r--mail/courier-authlib-vchkpw/files/courier-authdaemond.sh16
-rw-r--r--mail/courier-authlib-vchkpw/pkg-plist2
-rw-r--r--mail/courier-authlib/Makefile6
-rw-r--r--mail/courier-authlib/files/courier-authdaemond.sh16
-rw-r--r--mail/courier-authlib/pkg-plist2
-rw-r--r--net/courier-authlib-ldap/Makefile6
-rw-r--r--net/courier-authlib-ldap/files/courier-authdaemond.sh16
-rw-r--r--net/courier-authlib-ldap/pkg-plist2
-rw-r--r--security/courier-authlib-base/Makefile6
-rw-r--r--security/courier-authlib-base/files/courier-authdaemond.sh16
-rw-r--r--security/courier-authlib-base/pkg-plist2
-rw-r--r--security/courier-authlib/Makefile6
-rw-r--r--security/courier-authlib/files/courier-authdaemond.sh16
-rw-r--r--security/courier-authlib/pkg-plist2
27 files changed, 126 insertions, 90 deletions
diff --git a/databases/courier-authlib-mysql/Makefile b/databases/courier-authlib-mysql/Makefile
index a9de1f36fc2c..8be4fa9cad28 100644
--- a/databases/courier-authlib-mysql/Makefile
+++ b/databases/courier-authlib-mysql/Makefile
@@ -7,7 +7,7 @@
PORTNAME= courier-authlib
PORTVERSION= 0.55
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= courier
@@ -57,8 +57,6 @@ CONFIGURE_ARGS= --without-authshadow \
--with-mailgroup=${WITH_MAILGROUP} \
--with-authdaemonvar=/var/run/authdaemond
-PLIST_SUB= MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP}
-
.include <bsd.port.pre.mk>
.if defined(WITH_SYSLOG_FACILITY)
@@ -124,7 +122,7 @@ PLIST_SUB+= AUTHUSERDBFLAG="@comment "
PLIST_SUB+= AUTHUSERDBFLAG=""
.endif
-RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
+RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP}
MAN1= courierlogger.1
diff --git a/databases/courier-authlib-mysql/files/courier-authdaemond.sh b/databases/courier-authlib-mysql/files/courier-authdaemond.sh
index 88c9b91fa74e..c13b5d921c40 100644
--- a/databases/courier-authlib-mysql/files/courier-authdaemond.sh
+++ b/databases/courier-authlib-mysql/files/courier-authdaemond.sh
@@ -24,7 +24,8 @@ command="%%PREFIX%%/sbin/authdaemond"
start_cmd="authdaemond_cmd start"
stop_cmd="authdaemond_cmd stop"
restart_cmd="authdaemond_cmd stop && authdaemond_cmd start"
-pidfile="/var/run/authdaemond/pid"
+rundir=/var/run/authdaemond
+pidfile="${rundir}/pid"
procname="%%PREFIX%%/sbin/courierlogger"
load_rc_config $name
@@ -32,6 +33,13 @@ load_rc_config $name
authdaemond_cmd () {
case $1 in
start)
+ if [ ! -d "${rundir}" ] ; then
+ mkdir -p -m 0750 "${rundir}" && chown %%MAILUSER%%:%%MAILGROUP%% "${rundir}"
+ if [ $? -ne 0 ] ; then
+ echo "creating ${rundir} with the correct permissions was not possible!"
+ return 1
+ fi
+ fi
echo "Starting ${name}."
${command} start
;;
@@ -39,9 +47,9 @@ authdaemond_cmd () {
echo "Stopping ${name}."
${command} stop
if [ $? -eq 0 ] ; then
- [ -f "$pidfile" ] && rm -f "$pidfile"
- [ -f "$pidfile".lock ] && rm -f "$pidfile".lock
- [ -S /var/run/authdaemond/socket ] && rm -f /var/run/authdaemond/socket
+ [ -f "${pidfile}" ] && rm -f "$pidfile"
+ [ -f "${pidfile}.lock" ] && rm -f "${pidfile}.lock"
+ [ -S "${rundir}/socket" ] && rm -f "${rundir}/socket"
return 0
fi
;;
diff --git a/databases/courier-authlib-mysql/pkg-plist b/databases/courier-authlib-mysql/pkg-plist
index 2a5e2800f7b8..d3e729fba8d2 100644
--- a/databases/courier-authlib-mysql/pkg-plist
+++ b/databases/courier-authlib-mysql/pkg-plist
@@ -61,8 +61,6 @@ sbin/courierlogger
%%PORTDOCS%%%%DOCSDIR%%/README.ldap
%%PORTDOCS%%%%DOCSDIR%%/README_authlib.html
%%PORTDOCS%%@dirrm %%DOCSDIR%%
-@exec mkdir -m 0750 /var/run/authdaemond 2>/dev/null || true
-@exec chown %%MAILUSER%%:%%MAILGROUP%% /var/run/authdaemond 2>/dev/null || true
@unexec rmdir /var/run/authdaemond 2>/dev/null || true
@unexec rmdir %D/etc/authlib 2>/dev/null || true
@dirrm lib/courier-authlib
diff --git a/databases/courier-authlib-pgsql/Makefile b/databases/courier-authlib-pgsql/Makefile
index a9de1f36fc2c..8be4fa9cad28 100644
--- a/databases/courier-authlib-pgsql/Makefile
+++ b/databases/courier-authlib-pgsql/Makefile
@@ -7,7 +7,7 @@
PORTNAME= courier-authlib
PORTVERSION= 0.55
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= courier
@@ -57,8 +57,6 @@ CONFIGURE_ARGS= --without-authshadow \
--with-mailgroup=${WITH_MAILGROUP} \
--with-authdaemonvar=/var/run/authdaemond
-PLIST_SUB= MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP}
-
.include <bsd.port.pre.mk>
.if defined(WITH_SYSLOG_FACILITY)
@@ -124,7 +122,7 @@ PLIST_SUB+= AUTHUSERDBFLAG="@comment "
PLIST_SUB+= AUTHUSERDBFLAG=""
.endif
-RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
+RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP}
MAN1= courierlogger.1
diff --git a/databases/courier-authlib-pgsql/files/courier-authdaemond.sh b/databases/courier-authlib-pgsql/files/courier-authdaemond.sh
index 88c9b91fa74e..c13b5d921c40 100644
--- a/databases/courier-authlib-pgsql/files/courier-authdaemond.sh
+++ b/databases/courier-authlib-pgsql/files/courier-authdaemond.sh
@@ -24,7 +24,8 @@ command="%%PREFIX%%/sbin/authdaemond"
start_cmd="authdaemond_cmd start"
stop_cmd="authdaemond_cmd stop"
restart_cmd="authdaemond_cmd stop && authdaemond_cmd start"
-pidfile="/var/run/authdaemond/pid"
+rundir=/var/run/authdaemond
+pidfile="${rundir}/pid"
procname="%%PREFIX%%/sbin/courierlogger"
load_rc_config $name
@@ -32,6 +33,13 @@ load_rc_config $name
authdaemond_cmd () {
case $1 in
start)
+ if [ ! -d "${rundir}" ] ; then
+ mkdir -p -m 0750 "${rundir}" && chown %%MAILUSER%%:%%MAILGROUP%% "${rundir}"
+ if [ $? -ne 0 ] ; then
+ echo "creating ${rundir} with the correct permissions was not possible!"
+ return 1
+ fi
+ fi
echo "Starting ${name}."
${command} start
;;
@@ -39,9 +47,9 @@ authdaemond_cmd () {
echo "Stopping ${name}."
${command} stop
if [ $? -eq 0 ] ; then
- [ -f "$pidfile" ] && rm -f "$pidfile"
- [ -f "$pidfile".lock ] && rm -f "$pidfile".lock
- [ -S /var/run/authdaemond/socket ] && rm -f /var/run/authdaemond/socket
+ [ -f "${pidfile}" ] && rm -f "$pidfile"
+ [ -f "${pidfile}.lock" ] && rm -f "${pidfile}.lock"
+ [ -S "${rundir}/socket" ] && rm -f "${rundir}/socket"
return 0
fi
;;
diff --git a/databases/courier-authlib-pgsql/pkg-plist b/databases/courier-authlib-pgsql/pkg-plist
index 2a5e2800f7b8..d3e729fba8d2 100644
--- a/databases/courier-authlib-pgsql/pkg-plist
+++ b/databases/courier-authlib-pgsql/pkg-plist
@@ -61,8 +61,6 @@ sbin/courierlogger
%%PORTDOCS%%%%DOCSDIR%%/README.ldap
%%PORTDOCS%%%%DOCSDIR%%/README_authlib.html
%%PORTDOCS%%@dirrm %%DOCSDIR%%
-@exec mkdir -m 0750 /var/run/authdaemond 2>/dev/null || true
-@exec chown %%MAILUSER%%:%%MAILGROUP%% /var/run/authdaemond 2>/dev/null || true
@unexec rmdir /var/run/authdaemond 2>/dev/null || true
@unexec rmdir %D/etc/authlib 2>/dev/null || true
@dirrm lib/courier-authlib
diff --git a/databases/courier-authlib-userdb/Makefile b/databases/courier-authlib-userdb/Makefile
index a9de1f36fc2c..8be4fa9cad28 100644
--- a/databases/courier-authlib-userdb/Makefile
+++ b/databases/courier-authlib-userdb/Makefile
@@ -7,7 +7,7 @@
PORTNAME= courier-authlib
PORTVERSION= 0.55
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= courier
@@ -57,8 +57,6 @@ CONFIGURE_ARGS= --without-authshadow \
--with-mailgroup=${WITH_MAILGROUP} \
--with-authdaemonvar=/var/run/authdaemond
-PLIST_SUB= MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP}
-
.include <bsd.port.pre.mk>
.if defined(WITH_SYSLOG_FACILITY)
@@ -124,7 +122,7 @@ PLIST_SUB+= AUTHUSERDBFLAG="@comment "
PLIST_SUB+= AUTHUSERDBFLAG=""
.endif
-RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
+RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP}
MAN1= courierlogger.1
diff --git a/databases/courier-authlib-userdb/files/courier-authdaemond.sh b/databases/courier-authlib-userdb/files/courier-authdaemond.sh
index 88c9b91fa74e..c13b5d921c40 100644
--- a/databases/courier-authlib-userdb/files/courier-authdaemond.sh
+++ b/databases/courier-authlib-userdb/files/courier-authdaemond.sh
@@ -24,7 +24,8 @@ command="%%PREFIX%%/sbin/authdaemond"
start_cmd="authdaemond_cmd start"
stop_cmd="authdaemond_cmd stop"
restart_cmd="authdaemond_cmd stop && authdaemond_cmd start"
-pidfile="/var/run/authdaemond/pid"
+rundir=/var/run/authdaemond
+pidfile="${rundir}/pid"
procname="%%PREFIX%%/sbin/courierlogger"
load_rc_config $name
@@ -32,6 +33,13 @@ load_rc_config $name
authdaemond_cmd () {
case $1 in
start)
+ if [ ! -d "${rundir}" ] ; then
+ mkdir -p -m 0750 "${rundir}" && chown %%MAILUSER%%:%%MAILGROUP%% "${rundir}"
+ if [ $? -ne 0 ] ; then
+ echo "creating ${rundir} with the correct permissions was not possible!"
+ return 1
+ fi
+ fi
echo "Starting ${name}."
${command} start
;;
@@ -39,9 +47,9 @@ authdaemond_cmd () {
echo "Stopping ${name}."
${command} stop
if [ $? -eq 0 ] ; then
- [ -f "$pidfile" ] && rm -f "$pidfile"
- [ -f "$pidfile".lock ] && rm -f "$pidfile".lock
- [ -S /var/run/authdaemond/socket ] && rm -f /var/run/authdaemond/socket
+ [ -f "${pidfile}" ] && rm -f "$pidfile"
+ [ -f "${pidfile}.lock" ] && rm -f "${pidfile}.lock"
+ [ -S "${rundir}/socket" ] && rm -f "${rundir}/socket"
return 0
fi
;;
diff --git a/databases/courier-authlib-userdb/pkg-plist b/databases/courier-authlib-userdb/pkg-plist
index 2a5e2800f7b8..d3e729fba8d2 100644
--- a/databases/courier-authlib-userdb/pkg-plist
+++ b/databases/courier-authlib-userdb/pkg-plist
@@ -61,8 +61,6 @@ sbin/courierlogger
%%PORTDOCS%%%%DOCSDIR%%/README.ldap
%%PORTDOCS%%%%DOCSDIR%%/README_authlib.html
%%PORTDOCS%%@dirrm %%DOCSDIR%%
-@exec mkdir -m 0750 /var/run/authdaemond 2>/dev/null || true
-@exec chown %%MAILUSER%%:%%MAILGROUP%% /var/run/authdaemond 2>/dev/null || true
@unexec rmdir /var/run/authdaemond 2>/dev/null || true
@unexec rmdir %D/etc/authlib 2>/dev/null || true
@dirrm lib/courier-authlib
diff --git a/databases/courier-authlib-usergdbm/Makefile b/databases/courier-authlib-usergdbm/Makefile
index a9de1f36fc2c..8be4fa9cad28 100644
--- a/databases/courier-authlib-usergdbm/Makefile
+++ b/databases/courier-authlib-usergdbm/Makefile
@@ -7,7 +7,7 @@
PORTNAME= courier-authlib
PORTVERSION= 0.55
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= courier
@@ -57,8 +57,6 @@ CONFIGURE_ARGS= --without-authshadow \
--with-mailgroup=${WITH_MAILGROUP} \
--with-authdaemonvar=/var/run/authdaemond
-PLIST_SUB= MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP}
-
.include <bsd.port.pre.mk>
.if defined(WITH_SYSLOG_FACILITY)
@@ -124,7 +122,7 @@ PLIST_SUB+= AUTHUSERDBFLAG="@comment "
PLIST_SUB+= AUTHUSERDBFLAG=""
.endif
-RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
+RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP}
MAN1= courierlogger.1
diff --git a/databases/courier-authlib-usergdbm/files/courier-authdaemond.sh b/databases/courier-authlib-usergdbm/files/courier-authdaemond.sh
index 88c9b91fa74e..c13b5d921c40 100644
--- a/databases/courier-authlib-usergdbm/files/courier-authdaemond.sh
+++ b/databases/courier-authlib-usergdbm/files/courier-authdaemond.sh
@@ -24,7 +24,8 @@ command="%%PREFIX%%/sbin/authdaemond"
start_cmd="authdaemond_cmd start"
stop_cmd="authdaemond_cmd stop"
restart_cmd="authdaemond_cmd stop && authdaemond_cmd start"
-pidfile="/var/run/authdaemond/pid"
+rundir=/var/run/authdaemond
+pidfile="${rundir}/pid"
procname="%%PREFIX%%/sbin/courierlogger"
load_rc_config $name
@@ -32,6 +33,13 @@ load_rc_config $name
authdaemond_cmd () {
case $1 in
start)
+ if [ ! -d "${rundir}" ] ; then
+ mkdir -p -m 0750 "${rundir}" && chown %%MAILUSER%%:%%MAILGROUP%% "${rundir}"
+ if [ $? -ne 0 ] ; then
+ echo "creating ${rundir} with the correct permissions was not possible!"
+ return 1
+ fi
+ fi
echo "Starting ${name}."
${command} start
;;
@@ -39,9 +47,9 @@ authdaemond_cmd () {
echo "Stopping ${name}."
${command} stop
if [ $? -eq 0 ] ; then
- [ -f "$pidfile" ] && rm -f "$pidfile"
- [ -f "$pidfile".lock ] && rm -f "$pidfile".lock
- [ -S /var/run/authdaemond/socket ] && rm -f /var/run/authdaemond/socket
+ [ -f "${pidfile}" ] && rm -f "$pidfile"
+ [ -f "${pidfile}.lock" ] && rm -f "${pidfile}.lock"
+ [ -S "${rundir}/socket" ] && rm -f "${rundir}/socket"
return 0
fi
;;
diff --git a/databases/courier-authlib-usergdbm/pkg-plist b/databases/courier-authlib-usergdbm/pkg-plist
index 2a5e2800f7b8..d3e729fba8d2 100644
--- a/databases/courier-authlib-usergdbm/pkg-plist
+++ b/databases/courier-authlib-usergdbm/pkg-plist
@@ -61,8 +61,6 @@ sbin/courierlogger
%%PORTDOCS%%%%DOCSDIR%%/README.ldap
%%PORTDOCS%%%%DOCSDIR%%/README_authlib.html
%%PORTDOCS%%@dirrm %%DOCSDIR%%
-@exec mkdir -m 0750 /var/run/authdaemond 2>/dev/null || true
-@exec chown %%MAILUSER%%:%%MAILGROUP%% /var/run/authdaemond 2>/dev/null || true
@unexec rmdir /var/run/authdaemond 2>/dev/null || true
@unexec rmdir %D/etc/authlib 2>/dev/null || true
@dirrm lib/courier-authlib
diff --git a/mail/courier-authlib-vchkpw/Makefile b/mail/courier-authlib-vchkpw/Makefile
index a9de1f36fc2c..8be4fa9cad28 100644
--- a/mail/courier-authlib-vchkpw/Makefile
+++ b/mail/courier-authlib-vchkpw/Makefile
@@ -7,7 +7,7 @@
PORTNAME= courier-authlib
PORTVERSION= 0.55
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= courier
@@ -57,8 +57,6 @@ CONFIGURE_ARGS= --without-authshadow \
--with-mailgroup=${WITH_MAILGROUP} \
--with-authdaemonvar=/var/run/authdaemond
-PLIST_SUB= MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP}
-
.include <bsd.port.pre.mk>
.if defined(WITH_SYSLOG_FACILITY)
@@ -124,7 +122,7 @@ PLIST_SUB+= AUTHUSERDBFLAG="@comment "
PLIST_SUB+= AUTHUSERDBFLAG=""
.endif
-RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
+RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP}
MAN1= courierlogger.1
diff --git a/mail/courier-authlib-vchkpw/files/courier-authdaemond.sh b/mail/courier-authlib-vchkpw/files/courier-authdaemond.sh
index 88c9b91fa74e..c13b5d921c40 100644
--- a/mail/courier-authlib-vchkpw/files/courier-authdaemond.sh
+++ b/mail/courier-authlib-vchkpw/files/courier-authdaemond.sh
@@ -24,7 +24,8 @@ command="%%PREFIX%%/sbin/authdaemond"
start_cmd="authdaemond_cmd start"
stop_cmd="authdaemond_cmd stop"
restart_cmd="authdaemond_cmd stop && authdaemond_cmd start"
-pidfile="/var/run/authdaemond/pid"
+rundir=/var/run/authdaemond
+pidfile="${rundir}/pid"
procname="%%PREFIX%%/sbin/courierlogger"
load_rc_config $name
@@ -32,6 +33,13 @@ load_rc_config $name
authdaemond_cmd () {
case $1 in
start)
+ if [ ! -d "${rundir}" ] ; then
+ mkdir -p -m 0750 "${rundir}" && chown %%MAILUSER%%:%%MAILGROUP%% "${rundir}"
+ if [ $? -ne 0 ] ; then
+ echo "creating ${rundir} with the correct permissions was not possible!"
+ return 1
+ fi
+ fi
echo "Starting ${name}."
${command} start
;;
@@ -39,9 +47,9 @@ authdaemond_cmd () {
echo "Stopping ${name}."
${command} stop
if [ $? -eq 0 ] ; then
- [ -f "$pidfile" ] && rm -f "$pidfile"
- [ -f "$pidfile".lock ] && rm -f "$pidfile".lock
- [ -S /var/run/authdaemond/socket ] && rm -f /var/run/authdaemond/socket
+ [ -f "${pidfile}" ] && rm -f "$pidfile"
+ [ -f "${pidfile}.lock" ] && rm -f "${pidfile}.lock"
+ [ -S "${rundir}/socket" ] && rm -f "${rundir}/socket"
return 0
fi
;;
diff --git a/mail/courier-authlib-vchkpw/pkg-plist b/mail/courier-authlib-vchkpw/pkg-plist
index 2a5e2800f7b8..d3e729fba8d2 100644
--- a/mail/courier-authlib-vchkpw/pkg-plist
+++ b/mail/courier-authlib-vchkpw/pkg-plist
@@ -61,8 +61,6 @@ sbin/courierlogger
%%PORTDOCS%%%%DOCSDIR%%/README.ldap
%%PORTDOCS%%%%DOCSDIR%%/README_authlib.html
%%PORTDOCS%%@dirrm %%DOCSDIR%%
-@exec mkdir -m 0750 /var/run/authdaemond 2>/dev/null || true
-@exec chown %%MAILUSER%%:%%MAILGROUP%% /var/run/authdaemond 2>/dev/null || true
@unexec rmdir /var/run/authdaemond 2>/dev/null || true
@unexec rmdir %D/etc/authlib 2>/dev/null || true
@dirrm lib/courier-authlib
diff --git a/mail/courier-authlib/Makefile b/mail/courier-authlib/Makefile
index a9de1f36fc2c..8be4fa9cad28 100644
--- a/mail/courier-authlib/Makefile
+++ b/mail/courier-authlib/Makefile
@@ -7,7 +7,7 @@
PORTNAME= courier-authlib
PORTVERSION= 0.55
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= courier
@@ -57,8 +57,6 @@ CONFIGURE_ARGS= --without-authshadow \
--with-mailgroup=${WITH_MAILGROUP} \
--with-authdaemonvar=/var/run/authdaemond
-PLIST_SUB= MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP}
-
.include <bsd.port.pre.mk>
.if defined(WITH_SYSLOG_FACILITY)
@@ -124,7 +122,7 @@ PLIST_SUB+= AUTHUSERDBFLAG="@comment "
PLIST_SUB+= AUTHUSERDBFLAG=""
.endif
-RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
+RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP}
MAN1= courierlogger.1
diff --git a/mail/courier-authlib/files/courier-authdaemond.sh b/mail/courier-authlib/files/courier-authdaemond.sh
index 88c9b91fa74e..c13b5d921c40 100644
--- a/mail/courier-authlib/files/courier-authdaemond.sh
+++ b/mail/courier-authlib/files/courier-authdaemond.sh
@@ -24,7 +24,8 @@ command="%%PREFIX%%/sbin/authdaemond"
start_cmd="authdaemond_cmd start"
stop_cmd="authdaemond_cmd stop"
restart_cmd="authdaemond_cmd stop && authdaemond_cmd start"
-pidfile="/var/run/authdaemond/pid"
+rundir=/var/run/authdaemond
+pidfile="${rundir}/pid"
procname="%%PREFIX%%/sbin/courierlogger"
load_rc_config $name
@@ -32,6 +33,13 @@ load_rc_config $name
authdaemond_cmd () {
case $1 in
start)
+ if [ ! -d "${rundir}" ] ; then
+ mkdir -p -m 0750 "${rundir}" && chown %%MAILUSER%%:%%MAILGROUP%% "${rundir}"
+ if [ $? -ne 0 ] ; then
+ echo "creating ${rundir} with the correct permissions was not possible!"
+ return 1
+ fi
+ fi
echo "Starting ${name}."
${command} start
;;
@@ -39,9 +47,9 @@ authdaemond_cmd () {
echo "Stopping ${name}."
${command} stop
if [ $? -eq 0 ] ; then
- [ -f "$pidfile" ] && rm -f "$pidfile"
- [ -f "$pidfile".lock ] && rm -f "$pidfile".lock
- [ -S /var/run/authdaemond/socket ] && rm -f /var/run/authdaemond/socket
+ [ -f "${pidfile}" ] && rm -f "$pidfile"
+ [ -f "${pidfile}.lock" ] && rm -f "${pidfile}.lock"
+ [ -S "${rundir}/socket" ] && rm -f "${rundir}/socket"
return 0
fi
;;
diff --git a/mail/courier-authlib/pkg-plist b/mail/courier-authlib/pkg-plist
index 2a5e2800f7b8..d3e729fba8d2 100644
--- a/mail/courier-authlib/pkg-plist
+++ b/mail/courier-authlib/pkg-plist
@@ -61,8 +61,6 @@ sbin/courierlogger
%%PORTDOCS%%%%DOCSDIR%%/README.ldap
%%PORTDOCS%%%%DOCSDIR%%/README_authlib.html
%%PORTDOCS%%@dirrm %%DOCSDIR%%
-@exec mkdir -m 0750 /var/run/authdaemond 2>/dev/null || true
-@exec chown %%MAILUSER%%:%%MAILGROUP%% /var/run/authdaemond 2>/dev/null || true
@unexec rmdir /var/run/authdaemond 2>/dev/null || true
@unexec rmdir %D/etc/authlib 2>/dev/null || true
@dirrm lib/courier-authlib
diff --git a/net/courier-authlib-ldap/Makefile b/net/courier-authlib-ldap/Makefile
index a9de1f36fc2c..8be4fa9cad28 100644
--- a/net/courier-authlib-ldap/Makefile
+++ b/net/courier-authlib-ldap/Makefile
@@ -7,7 +7,7 @@
PORTNAME= courier-authlib
PORTVERSION= 0.55
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= courier
@@ -57,8 +57,6 @@ CONFIGURE_ARGS= --without-authshadow \
--with-mailgroup=${WITH_MAILGROUP} \
--with-authdaemonvar=/var/run/authdaemond
-PLIST_SUB= MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP}
-
.include <bsd.port.pre.mk>
.if defined(WITH_SYSLOG_FACILITY)
@@ -124,7 +122,7 @@ PLIST_SUB+= AUTHUSERDBFLAG="@comment "
PLIST_SUB+= AUTHUSERDBFLAG=""
.endif
-RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
+RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP}
MAN1= courierlogger.1
diff --git a/net/courier-authlib-ldap/files/courier-authdaemond.sh b/net/courier-authlib-ldap/files/courier-authdaemond.sh
index 88c9b91fa74e..c13b5d921c40 100644
--- a/net/courier-authlib-ldap/files/courier-authdaemond.sh
+++ b/net/courier-authlib-ldap/files/courier-authdaemond.sh
@@ -24,7 +24,8 @@ command="%%PREFIX%%/sbin/authdaemond"
start_cmd="authdaemond_cmd start"
stop_cmd="authdaemond_cmd stop"
restart_cmd="authdaemond_cmd stop && authdaemond_cmd start"
-pidfile="/var/run/authdaemond/pid"
+rundir=/var/run/authdaemond
+pidfile="${rundir}/pid"
procname="%%PREFIX%%/sbin/courierlogger"
load_rc_config $name
@@ -32,6 +33,13 @@ load_rc_config $name
authdaemond_cmd () {
case $1 in
start)
+ if [ ! -d "${rundir}" ] ; then
+ mkdir -p -m 0750 "${rundir}" && chown %%MAILUSER%%:%%MAILGROUP%% "${rundir}"
+ if [ $? -ne 0 ] ; then
+ echo "creating ${rundir} with the correct permissions was not possible!"
+ return 1
+ fi
+ fi
echo "Starting ${name}."
${command} start
;;
@@ -39,9 +47,9 @@ authdaemond_cmd () {
echo "Stopping ${name}."
${command} stop
if [ $? -eq 0 ] ; then
- [ -f "$pidfile" ] && rm -f "$pidfile"
- [ -f "$pidfile".lock ] && rm -f "$pidfile".lock
- [ -S /var/run/authdaemond/socket ] && rm -f /var/run/authdaemond/socket
+ [ -f "${pidfile}" ] && rm -f "$pidfile"
+ [ -f "${pidfile}.lock" ] && rm -f "${pidfile}.lock"
+ [ -S "${rundir}/socket" ] && rm -f "${rundir}/socket"
return 0
fi
;;
diff --git a/net/courier-authlib-ldap/pkg-plist b/net/courier-authlib-ldap/pkg-plist
index 2a5e2800f7b8..d3e729fba8d2 100644
--- a/net/courier-authlib-ldap/pkg-plist
+++ b/net/courier-authlib-ldap/pkg-plist
@@ -61,8 +61,6 @@ sbin/courierlogger
%%PORTDOCS%%%%DOCSDIR%%/README.ldap
%%PORTDOCS%%%%DOCSDIR%%/README_authlib.html
%%PORTDOCS%%@dirrm %%DOCSDIR%%
-@exec mkdir -m 0750 /var/run/authdaemond 2>/dev/null || true
-@exec chown %%MAILUSER%%:%%MAILGROUP%% /var/run/authdaemond 2>/dev/null || true
@unexec rmdir /var/run/authdaemond 2>/dev/null || true
@unexec rmdir %D/etc/authlib 2>/dev/null || true
@dirrm lib/courier-authlib
diff --git a/security/courier-authlib-base/Makefile b/security/courier-authlib-base/Makefile
index a9de1f36fc2c..8be4fa9cad28 100644
--- a/security/courier-authlib-base/Makefile
+++ b/security/courier-authlib-base/Makefile
@@ -7,7 +7,7 @@
PORTNAME= courier-authlib
PORTVERSION= 0.55
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= courier
@@ -57,8 +57,6 @@ CONFIGURE_ARGS= --without-authshadow \
--with-mailgroup=${WITH_MAILGROUP} \
--with-authdaemonvar=/var/run/authdaemond
-PLIST_SUB= MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP}
-
.include <bsd.port.pre.mk>
.if defined(WITH_SYSLOG_FACILITY)
@@ -124,7 +122,7 @@ PLIST_SUB+= AUTHUSERDBFLAG="@comment "
PLIST_SUB+= AUTHUSERDBFLAG=""
.endif
-RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
+RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP}
MAN1= courierlogger.1
diff --git a/security/courier-authlib-base/files/courier-authdaemond.sh b/security/courier-authlib-base/files/courier-authdaemond.sh
index 88c9b91fa74e..c13b5d921c40 100644
--- a/security/courier-authlib-base/files/courier-authdaemond.sh
+++ b/security/courier-authlib-base/files/courier-authdaemond.sh
@@ -24,7 +24,8 @@ command="%%PREFIX%%/sbin/authdaemond"
start_cmd="authdaemond_cmd start"
stop_cmd="authdaemond_cmd stop"
restart_cmd="authdaemond_cmd stop && authdaemond_cmd start"
-pidfile="/var/run/authdaemond/pid"
+rundir=/var/run/authdaemond
+pidfile="${rundir}/pid"
procname="%%PREFIX%%/sbin/courierlogger"
load_rc_config $name
@@ -32,6 +33,13 @@ load_rc_config $name
authdaemond_cmd () {
case $1 in
start)
+ if [ ! -d "${rundir}" ] ; then
+ mkdir -p -m 0750 "${rundir}" && chown %%MAILUSER%%:%%MAILGROUP%% "${rundir}"
+ if [ $? -ne 0 ] ; then
+ echo "creating ${rundir} with the correct permissions was not possible!"
+ return 1
+ fi
+ fi
echo "Starting ${name}."
${command} start
;;
@@ -39,9 +47,9 @@ authdaemond_cmd () {
echo "Stopping ${name}."
${command} stop
if [ $? -eq 0 ] ; then
- [ -f "$pidfile" ] && rm -f "$pidfile"
- [ -f "$pidfile".lock ] && rm -f "$pidfile".lock
- [ -S /var/run/authdaemond/socket ] && rm -f /var/run/authdaemond/socket
+ [ -f "${pidfile}" ] && rm -f "$pidfile"
+ [ -f "${pidfile}.lock" ] && rm -f "${pidfile}.lock"
+ [ -S "${rundir}/socket" ] && rm -f "${rundir}/socket"
return 0
fi
;;
diff --git a/security/courier-authlib-base/pkg-plist b/security/courier-authlib-base/pkg-plist
index 2a5e2800f7b8..d3e729fba8d2 100644
--- a/security/courier-authlib-base/pkg-plist
+++ b/security/courier-authlib-base/pkg-plist
@@ -61,8 +61,6 @@ sbin/courierlogger
%%PORTDOCS%%%%DOCSDIR%%/README.ldap
%%PORTDOCS%%%%DOCSDIR%%/README_authlib.html
%%PORTDOCS%%@dirrm %%DOCSDIR%%
-@exec mkdir -m 0750 /var/run/authdaemond 2>/dev/null || true
-@exec chown %%MAILUSER%%:%%MAILGROUP%% /var/run/authdaemond 2>/dev/null || true
@unexec rmdir /var/run/authdaemond 2>/dev/null || true
@unexec rmdir %D/etc/authlib 2>/dev/null || true
@dirrm lib/courier-authlib
diff --git a/security/courier-authlib/Makefile b/security/courier-authlib/Makefile
index a9de1f36fc2c..8be4fa9cad28 100644
--- a/security/courier-authlib/Makefile
+++ b/security/courier-authlib/Makefile
@@ -7,7 +7,7 @@
PORTNAME= courier-authlib
PORTVERSION= 0.55
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= courier
@@ -57,8 +57,6 @@ CONFIGURE_ARGS= --without-authshadow \
--with-mailgroup=${WITH_MAILGROUP} \
--with-authdaemonvar=/var/run/authdaemond
-PLIST_SUB= MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP}
-
.include <bsd.port.pre.mk>
.if defined(WITH_SYSLOG_FACILITY)
@@ -124,7 +122,7 @@ PLIST_SUB+= AUTHUSERDBFLAG="@comment "
PLIST_SUB+= AUTHUSERDBFLAG=""
.endif
-RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
+RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP}
MAN1= courierlogger.1
diff --git a/security/courier-authlib/files/courier-authdaemond.sh b/security/courier-authlib/files/courier-authdaemond.sh
index 88c9b91fa74e..c13b5d921c40 100644
--- a/security/courier-authlib/files/courier-authdaemond.sh
+++ b/security/courier-authlib/files/courier-authdaemond.sh
@@ -24,7 +24,8 @@ command="%%PREFIX%%/sbin/authdaemond"
start_cmd="authdaemond_cmd start"
stop_cmd="authdaemond_cmd stop"
restart_cmd="authdaemond_cmd stop && authdaemond_cmd start"
-pidfile="/var/run/authdaemond/pid"
+rundir=/var/run/authdaemond
+pidfile="${rundir}/pid"
procname="%%PREFIX%%/sbin/courierlogger"
load_rc_config $name
@@ -32,6 +33,13 @@ load_rc_config $name
authdaemond_cmd () {
case $1 in
start)
+ if [ ! -d "${rundir}" ] ; then
+ mkdir -p -m 0750 "${rundir}" && chown %%MAILUSER%%:%%MAILGROUP%% "${rundir}"
+ if [ $? -ne 0 ] ; then
+ echo "creating ${rundir} with the correct permissions was not possible!"
+ return 1
+ fi
+ fi
echo "Starting ${name}."
${command} start
;;
@@ -39,9 +47,9 @@ authdaemond_cmd () {
echo "Stopping ${name}."
${command} stop
if [ $? -eq 0 ] ; then
- [ -f "$pidfile" ] && rm -f "$pidfile"
- [ -f "$pidfile".lock ] && rm -f "$pidfile".lock
- [ -S /var/run/authdaemond/socket ] && rm -f /var/run/authdaemond/socket
+ [ -f "${pidfile}" ] && rm -f "$pidfile"
+ [ -f "${pidfile}.lock" ] && rm -f "${pidfile}.lock"
+ [ -S "${rundir}/socket" ] && rm -f "${rundir}/socket"
return 0
fi
;;
diff --git a/security/courier-authlib/pkg-plist b/security/courier-authlib/pkg-plist
index 2a5e2800f7b8..d3e729fba8d2 100644
--- a/security/courier-authlib/pkg-plist
+++ b/security/courier-authlib/pkg-plist
@@ -61,8 +61,6 @@ sbin/courierlogger
%%PORTDOCS%%%%DOCSDIR%%/README.ldap
%%PORTDOCS%%%%DOCSDIR%%/README_authlib.html
%%PORTDOCS%%@dirrm %%DOCSDIR%%
-@exec mkdir -m 0750 /var/run/authdaemond 2>/dev/null || true
-@exec chown %%MAILUSER%%:%%MAILGROUP%% /var/run/authdaemond 2>/dev/null || true
@unexec rmdir /var/run/authdaemond 2>/dev/null || true
@unexec rmdir %D/etc/authlib 2>/dev/null || true
@dirrm lib/courier-authlib