summaryrefslogtreecommitdiff
path: root/mail/qmail-run/files
diff options
context:
space:
mode:
authorschmonz <schmonz@pkgsrc.org>2020-10-05 12:17:20 +0000
committerschmonz <schmonz@pkgsrc.org>2020-10-05 12:17:20 +0000
commitd6322e4c619788462c71cdd590f1f49983626a1c (patch)
tree49ce77b1dcb62152fdc353a82922171690c1e8cb /mail/qmail-run/files
parent924058b5c2bece0ce7faa2e2aa9ba513a091325a (diff)
downloadpkgsrc-d6322e4c619788462c71cdd590f1f49983626a1c.tar.gz
If any of our several rcvars aren't YES, that's fine: don't exit
nonzero. Bump version. While here, document in qmail-qread-client that its rc.conf vars are shared with the qmailqread service.
Diffstat (limited to 'mail/qmail-run/files')
-rw-r--r--mail/qmail-run/files/qmail-qread-client.sh9
-rw-r--r--mail/qmail-run/files/qmail.sh6
2 files changed, 11 insertions, 4 deletions
diff --git a/mail/qmail-run/files/qmail-qread-client.sh b/mail/qmail-run/files/qmail-qread-client.sh
index 307f47e9d4f..18c52a736e5 100644
--- a/mail/qmail-run/files/qmail-qread-client.sh
+++ b/mail/qmail-run/files/qmail-qread-client.sh
@@ -1,6 +1,6 @@
#!@SH@
#
-# $NetBSD: qmail-qread-client.sh,v 1.5 2017/04/11 14:04:37 schmonz Exp $
+# $NetBSD: qmail-qread-client.sh,v 1.6 2020/10/05 12:17:20 schmonz Exp $
#
# @PKGNAME@ client program to allow local non-root users to see
# the queue. Requires that the corresponding server program be running.
@@ -9,10 +9,15 @@
if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
- load_rc_config qmailqread
fi
+# User-settable rc.conf variables and their default values
+# (shared with the qmailqread service):
: ${qmailqread_tcphost:="127.0.0.1"}
: ${qmailqread_tcpport:="20025"}
+if [ -f /etc/rc.subr ]; then
+ load_rc_config qmailqread
+fi
+
exec @PREFIX@/bin/tcpclient -RHl0 -- ${qmailqread_tcphost} ${qmailqread_tcpport} @SH@ -c 'exec @CAT@ <&6'
diff --git a/mail/qmail-run/files/qmail.sh b/mail/qmail-run/files/qmail.sh
index 2bbc9a08c99..fa54f320402 100644
--- a/mail/qmail-run/files/qmail.sh
+++ b/mail/qmail-run/files/qmail.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: qmail.sh,v 1.9 2018/12/30 19:09:05 schmonz Exp $
+# $NetBSD: qmail.sh,v 1.10 2020/10/05 12:17:20 schmonz Exp $
#
# @PKGNAME@ master script for administrators to control qmail
# services. Usage resembles the qmailctl script from "Life with qmail".
@@ -36,7 +36,9 @@ qmailrcd() {
for service in "$@"; do
if [ -f /etc/rc.subr ]; then
load_rc_config $service
- checkyesno $service && $rcd_dir/${service} $rc_arg
+ if checkyesno $service; then
+ $rcd_dir/${service} $rc_arg
+ fi
else
$rcd_dir/${service} $rc_arg
fi