git: f94127e3ee91 - stable/14 - rc.d/sendmail: Fix stopping service during shutdown

From: Mateusz Piotrowski <0mp_at_FreeBSD.org>
Date: Mon, 14 Oct 2024 10:24:06 UTC
The branch stable/14 has been updated by 0mp:

URL: https://cgit.FreeBSD.org/src/commit/?id=f94127e3ee9181f60576c823ecee6c85625b96e1

commit f94127e3ee9181f60576c823ecee6c85625b96e1
Author:     Mateusz Piotrowski <0mp@FreeBSD.org>
AuthorDate: 2024-10-04 12:26:45 +0000
Commit:     Mateusz Piotrowski <0mp@FreeBSD.org>
CommitDate: 2024-10-14 10:23:46 +0000

    rc.d/sendmail: Fix stopping service during shutdown
    
    The sendmail service script needs to be stopped during shutdown
    to ensure a clean shutdown of active SMTP connections (and writing
    any in memory queue files).
    
    rcorder(8) requires the rcorder block to be an uninterrupted sequence of
    REQUIRE, PROVIDE, BEFORE, and KEYWORD lines. Having a comment in between
    REQUIRE and KEYWORD makes rcorder stop parsing the block when it reaches
    the comment.
    
    Fix that by moving the comment out from the rcorder block.
    
    Reviewed by:    bnovkov, christos, gshapiro, markj
    Approved by:    bnovkov (mentor), christos (mentor), markj (mentor)
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D46924
    
    (cherry picked from commit 8751fbe36ff02ed695f02132ee6eac723d2bbe3f)
---
 libexec/rc/rc.d/sendmail | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libexec/rc/rc.d/sendmail b/libexec/rc/rc.d/sendmail
index 68803a957952..ea97503890f9 100755
--- a/libexec/rc/rc.d/sendmail
+++ b/libexec/rc/rc.d/sendmail
@@ -4,9 +4,10 @@
 
 # PROVIDE: mail
 # REQUIRE: LOGIN FILESYSTEMS
-#	we make mail start late, so that things like .forward's are not
-#	processed until the system is fully operational
 # KEYWORD: shutdown
+#
+# We make mail start late, so that things like .forward's are not processed
+# until the system is fully operational.
 
 # XXX - Get together with sendmail mantainer to figure out how to
 #	better handle SENDMAIL_ENABLE and 3rd party MTAs.