From owner-freebsd-rc@FreeBSD.ORG Mon Sep 16 21:49:05 2013 Return-Path: Delivered-To: rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B25359AE for ; Mon, 16 Sep 2013 21:49:05 +0000 (UTC) (envelope-from jmg@h2.funkthat.com) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 949472175 for ; Mon, 16 Sep 2013 21:49:02 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id r8GLn1K3081704 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 16 Sep 2013 14:49:01 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id r8GLn1Xr081703 for rc@FreeBSD.org; Mon, 16 Sep 2013 14:49:01 -0700 (PDT) (envelope-from jmg) Date: Mon, 16 Sep 2013 14:49:01 -0700 From: John-Mark Gurney To: rc@FreeBSD.org Subject: sendmail queue runner starting multiple times... Message-ID: <20130916214901.GE68682@funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Mon, 16 Sep 2013 14:49:01 -0700 (PDT) X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 21:49:05 -0000 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."