pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/qmail/files Explain why, after setting "command" ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6f69a4c82d41
branches:  trunk
changeset: 474265:6f69a4c82d41
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Tue Apr 27 03:05:09 2004 +0000

description:
Explain why, after setting "command" in the usual way, we set it
again in foo_precmd() to a different value. This is an unusual
usage, and these comments may help if a future rc.subr isn't as
accommodating to such trickery. Suggested by lukem.

diffstat:

 mail/qmail/files/qmail.sh      |  4 +++-
 mail/qmail/files/qmailpop3d.sh |  5 ++++-
 mail/qmail/files/qmailsmtpd.sh |  5 ++++-
 3 files changed, 11 insertions(+), 3 deletions(-)

diffs (62 lines):

diff -r 6e20beea4420 -r 6f69a4c82d41 mail/qmail/files/qmail.sh
--- a/mail/qmail/files/qmail.sh Tue Apr 27 02:24:08 2004 +0000
+++ b/mail/qmail/files/qmail.sh Tue Apr 27 03:05:09 2004 +0000
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: qmail.sh,v 1.3 2004/04/10 05:30:06 schmonz Exp $
+# $NetBSD: qmail.sh,v 1.4 2004/04/27 03:05:09 schmonz Exp $
 #
 
 # PROVIDE: mail qmail
@@ -21,6 +21,8 @@
 
 qmail_precmd()
 {
+       # qmail-start(8) starts the various qmail processes, then exits.
+       # qmail-send(8) is the process we want to signal later.
        command="@SETENV@ - PATH=@QMAILDIR@/bin:$PATH qmail-start '$qmail_flags' splogger qmail"
        command_args="&"
        rc_flags=""
diff -r 6e20beea4420 -r 6f69a4c82d41 mail/qmail/files/qmailpop3d.sh
--- a/mail/qmail/files/qmailpop3d.sh    Tue Apr 27 02:24:08 2004 +0000
+++ b/mail/qmail/files/qmailpop3d.sh    Tue Apr 27 03:05:09 2004 +0000
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: qmailpop3d.sh,v 1.1 2004/04/24 05:29:36 schmonz Exp $
+# $NetBSD: qmailpop3d.sh,v 1.2 2004/04/27 03:05:09 schmonz Exp $
 #
 
 # PROVIDE: mail
@@ -21,6 +21,9 @@
 
 qmailpop3d_precmd()
 {
+       # tcpserver(1) is akin to inetd(8), but runs one service per process.
+       # We want to signal only the tcpserver process responsible for POP
+       # service. Use argv0(1) to set procname to "qmailpop3d".
        command="@SETENV@ - @LOCALBASE_NORMAL@/bin/argv0 @LOCALBASE_NORMAL@/bin/tcpserver $name $qmailpop3d_flags 0 110 @QMAILDIR@/bin/qmail-popup `@CAT@ @QMAILDIR@/control/me` 
@LOCALBASE_NORMAL@/bin/checkpassword @QMAILDIR@/bin/qmail-pop3d Maildir 2>&1 | @QMAILDIR@/bin/splogger pop3d 3"
        command_args="&"
        rc_flags=""
diff -r 6e20beea4420 -r 6f69a4c82d41 mail/qmail/files/qmailsmtpd.sh
--- a/mail/qmail/files/qmailsmtpd.sh    Tue Apr 27 02:24:08 2004 +0000
+++ b/mail/qmail/files/qmailsmtpd.sh    Tue Apr 27 03:05:09 2004 +0000
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: qmailsmtpd.sh,v 1.2 2004/04/24 05:29:36 schmonz Exp $
+# $NetBSD: qmailsmtpd.sh,v 1.3 2004/04/27 03:05:09 schmonz Exp $
 #
 
 # PROVIDE: mail
@@ -21,6 +21,9 @@
 
 qmailsmtpd_precmd()
 {
+       # tcpserver(1) is akin to inetd(8), but runs one service per process.
+       # We want to signal only the tcpserver process responsible for SMTP
+       # service. Use argv0(1) to set procname to "qmailsmtpd".
        command="@SETENV@ - @LOCALBASE_NORMAL@/bin/argv0 @LOCALBASE_NORMAL@/bin/tcpserver $name $qmailsmtpd_flags -u `@ID@ -u qmaild` -g `@ID@ -g qmaild` 0 25 @QMAILDIR@/bin/qmail-smtpd 2>&1 | 
@QMAILDIR@/bin/splogger smtpd 3"
        command_args="&"
        rc_flags=""



Home | Main Index | Thread Index | Old Index