Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Sep 2013 14:49:01 -0700
From:      John-Mark Gurney <jmg@funkthat.com>
To:        rc@FreeBSD.org
Subject:   sendmail queue runner starting multiple times...
Message-ID:  <20130916214901.GE68682@funkthat.com>

next in thread | raw e-mail | index | archive | help
I noticed that if you start sendmail, it doesn't detect that the
mail queue runner is already running and starts it up multiple times...

My proposed patch is:
--- /usr/src/etc/rc.d/sendmail  2013-01-12 21:34:02.000000000 -0800
+++ /tmp/sendmail.rc    2013-09-16 14:45:21.000000000 -0700
@@ -93,7 +93,7 @@
 
 name="sendmail_clientmqueue"
 rcvar="sendmail_msp_queue_enable"
-start_cmd="${command} ${sendmail_msp_queue_flags}"
 pidfile="${sendmail_mspq_pidfile:-/var/spool/clientmqueue/sm-client.pid}"
+start_cmd="[ -z \"`check_pidfile "${pidfile}" "${command}"`\" ] && ${command} ${sendmail_msp_queue_flags} && _run_rc_postcmd"
 required_files="/etc/mail/submit.cf"
 run_rc_command "$1"


This is because setting start_cmd disables the pid checks, so we need
to add them back...  This patch won't print out the already running
bit, but we also don't print out the fact that we are starting it, it
doesn't seem like that big of a loss..

Is there a better way?  If someone else doesn't produce a better patch,
I'll get re's permission to commit in few days...

Thanks.

P.S. Please CC me, I'm not on the list.

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130916214901.GE68682>