pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mail/qmail-run/files K&R-style braces in rc.d scripts....



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b75ed0987c84
branches:  trunk
changeset: 388763:b75ed0987c84
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Fri Dec 14 06:55:07 2018 +0000

description:
K&R-style braces in rc.d scripts. NFCI.

diffstat:

 mail/qmail-run/files/qmail.sh       |  14 +++++---------
 mail/qmail-run/files/qmailofmipd.sh |  17 ++++++-----------
 mail/qmail-run/files/qmailpop3d.sh  |  17 ++++++-----------
 mail/qmail-run/files/qmailqread.sh  |  14 +++++---------
 mail/qmail-run/files/qmailsend.sh   |  29 ++++++++++-------------------
 mail/qmail-run/files/qmailsmtpd.sh  |  17 ++++++-----------
 6 files changed, 38 insertions(+), 70 deletions(-)

diffs (truncated from 351 to 300 lines):

diff -r bc7ada6e56f3 -r b75ed0987c84 mail/qmail-run/files/qmail.sh
--- a/mail/qmail-run/files/qmail.sh     Fri Dec 14 06:49:36 2018 +0000
+++ b/mail/qmail-run/files/qmail.sh     Fri Dec 14 06:55:07 2018 +0000
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: qmail.sh,v 1.7 2017/08/05 03:03:17 schmonz Exp $
+# $NetBSD: qmail.sh,v 1.8 2018/12/14 06:55:07 schmonz Exp $
 #
 # @PKGNAME@ master script for administrators to control qmail
 # services. Usage resembles the qmailctl script from "Life with qmail".
@@ -20,13 +20,11 @@
 
 # NOTE: run_rc_command sets $rc_arg
 #
-forward_commands()
-{
+forward_commands() {
        qmailrcd $COMMAND_LIST
 }
 
-reverse_commands()
-{
+reverse_commands() {
        REVCOMMAND_LIST=
        for file in $COMMAND_LIST; do
                REVCOMMAND_LIST="$file $REVCOMMAND_LIST"
@@ -35,8 +33,7 @@
        qmailrcd $REVCOMMAND_LIST
 }
 
-qmailrcd()
-{
+qmailrcd() {
        # Backward compat with NetBSD <1.6:
        [ -z "$rc_arg" ] && rc_arg=$_arg
 
@@ -50,8 +47,7 @@
        done
 }
 
-qmail_help()
-{
+qmail_help() {
        @CAT@ <<HELP
    stop -- stops mail service (smtp connections refused, nothing goes out)
   start -- starts mail service (smtp connection accepted, mail can go out)
diff -r bc7ada6e56f3 -r b75ed0987c84 mail/qmail-run/files/qmailofmipd.sh
--- a/mail/qmail-run/files/qmailofmipd.sh       Fri Dec 14 06:49:36 2018 +0000
+++ b/mail/qmail-run/files/qmailofmipd.sh       Fri Dec 14 06:55:07 2018 +0000
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: qmailofmipd.sh,v 1.20 2018/12/14 06:49:31 schmonz Exp $
+# $NetBSD: qmailofmipd.sh,v 1.21 2018/12/14 06:55:07 schmonz Exp $
 #
 # @PKGNAME@ script to control ofmipd (SMTP submission service).
 #
@@ -80,8 +80,7 @@
        fi
 }
 
-qmailofmipd_precmd()
-{
+qmailofmipd_precmd() {
        if [ -f /etc/rc.subr ] && ! checkyesno qmailofmipd_log; then
                qmailofmipd_logcmd=${qmailofmipd_nologcmd}
        fi
@@ -106,13 +105,11 @@
        rc_flags=""
 }
 
-qmailofmipd_stat()
-{
+qmailofmipd_stat() {
        run_rc_command status
 }
 
-qmailofmipd_pause()
-{
+qmailofmipd_pause() {
        if ! statusmsg=`run_rc_command status`; then
                @ECHO@ $statusmsg
                return 1
@@ -121,8 +118,7 @@
        kill -STOP $rc_pid
 }
 
-qmailofmipd_cont()
-{
+qmailofmipd_cont() {
        if ! statusmsg=`run_rc_command status`; then
                @ECHO@ $statusmsg
                return 1
@@ -137,8 +133,7 @@
        [ -f "${_src}" -a "${_src}" -nt "${_dst}" ] || [ ! -f "${_dst}" ]
 }
 
-qmailofmipd_cdb()
-{
+qmailofmipd_cdb() {
        @ECHO@ "Reloading ${qmailofmipd_tcprules}"
        @PREFIX@/bin/tcprules ${qmailofmipd_tcprules}.cdb ${qmailofmipd_tcprules}.tmp < ${qmailofmipd_tcprules}
        @CHMOD@ 644 ${qmailofmipd_tcprules}.cdb
diff -r bc7ada6e56f3 -r b75ed0987c84 mail/qmail-run/files/qmailpop3d.sh
--- a/mail/qmail-run/files/qmailpop3d.sh        Fri Dec 14 06:49:36 2018 +0000
+++ b/mail/qmail-run/files/qmailpop3d.sh        Fri Dec 14 06:55:07 2018 +0000
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: qmailpop3d.sh,v 1.28 2018/12/14 06:49:31 schmonz Exp $
+# $NetBSD: qmailpop3d.sh,v 1.29 2018/12/14 06:55:07 schmonz Exp $
 #
 # @PKGNAME@ script to control qmail-pop3d (POP3 server for Maildirs).
 #
@@ -77,8 +77,7 @@
        fi
 }
 
-qmailpop3d_precmd()
-{
+qmailpop3d_precmd() {
        if [ -f /etc/rc.subr ] && ! checkyesno qmailpop3d_log; then
                qmailpop3d_logcmd=${qmailpop3d_nologcmd}
        fi
@@ -103,13 +102,11 @@
        rc_flags=""
 }
 
-qmailpop3d_stat()
-{
+qmailpop3d_stat() {
        run_rc_command status
 }
 
-qmailpop3d_pause()
-{
+qmailpop3d_pause() {
        if ! statusmsg=`run_rc_command status`; then
                @ECHO@ $statusmsg
                return 1
@@ -118,8 +115,7 @@
        kill -STOP $rc_pid
 }
 
-qmailpop3d_cont()
-{
+qmailpop3d_cont() {
        if ! statusmsg=`run_rc_command status`; then
                @ECHO@ $statusmsg
                return 1
@@ -134,8 +130,7 @@
        [ -f "${_src}" -a "${_src}" -nt "${_dst}" ] || [ ! -f "${_dst}" ]
 }
 
-qmailpop3d_cdb()
-{
+qmailpop3d_cdb() {
        @ECHO@ "Reloading ${qmailpop3d_tcprules}."
        @PREFIX@/bin/tcprules ${qmailpop3d_tcprules}.cdb ${qmailpop3d_tcprules}.tmp < ${qmailpop3d_tcprules}
        @CHMOD@ 644 ${qmailpop3d_tcprules}.cdb
diff -r bc7ada6e56f3 -r b75ed0987c84 mail/qmail-run/files/qmailqread.sh
--- a/mail/qmail-run/files/qmailqread.sh        Fri Dec 14 06:49:36 2018 +0000
+++ b/mail/qmail-run/files/qmailqread.sh        Fri Dec 14 06:55:07 2018 +0000
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: qmailqread.sh,v 1.16 2018/11/28 16:42:44 schmonz Exp $
+# $NetBSD: qmailqread.sh,v 1.17 2018/12/14 06:55:07 schmonz Exp $
 #
 # @PKGNAME@ script to control a service providing local non-root
 # users access to see the queue. Adapted from a script by Steinar Haug.
@@ -34,8 +34,7 @@
 pause_cmd="qmailqread_pause"
 cont_cmd="qmailqread_cont"
 
-qmailqread_precmd()
-{
+qmailqread_precmd() {
        if [ -f /etc/rc.subr ] && ! checkyesno qmailqread_log; then
                qmailqread_logcmd=${qmailqread_nologcmd}
        fi
@@ -54,13 +53,11 @@
        rc_flags=""
 }
 
-qmailqread_stat()
-{
+qmailqread_stat() {
        run_rc_command status
 }
 
-qmailqread_pause()
-{
+qmailqread_pause() {
        if ! statusmsg=`run_rc_command status`; then
                @ECHO@ $statusmsg
                return 1
@@ -69,8 +66,7 @@
        kill -STOP $rc_pid
 }
 
-qmailqread_cont()
-{
+qmailqread_cont() {
        if ! statusmsg=`run_rc_command status`; then
                @ECHO@ $statusmsg
                return 1
diff -r bc7ada6e56f3 -r b75ed0987c84 mail/qmail-run/files/qmailsend.sh
--- a/mail/qmail-run/files/qmailsend.sh Fri Dec 14 06:49:36 2018 +0000
+++ b/mail/qmail-run/files/qmailsend.sh Fri Dec 14 06:55:07 2018 +0000
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: qmailsend.sh,v 1.15 2018/12/12 01:08:30 schmonz Exp $
+# $NetBSD: qmailsend.sh,v 1.16 2018/12/14 06:55:07 schmonz Exp $
 #
 # @PKGNAME@ script to control qmail-send (local and outgoing mail).
 #
@@ -40,8 +40,7 @@
 flush_cmd="qmailsend_doqueue"
 hup_cmd="qmailsend_hup"
 
-qmailsend_prestart()
-{
+qmailsend_prestart() {
        if [ -f /etc/rc.subr ] && ! checkyesno qmailsend_log; then
                qmailsend_logcmd=${qmailsend_nologcmd}
        fi
@@ -55,23 +54,19 @@
        rc_flags=""
 }
 
-qmailsend_poststart()
-{
+qmailsend_poststart() {
        echo $! > ${pidfile}
 }
 
-qmailsend_poststop()
-{
+qmailsend_poststop() {
        rm -f ${pidfile}
 }
 
-qmailsend_stat()
-{
+qmailsend_stat() {
        run_rc_command status
 }
 
-qmailsend_pause()
-{
+qmailsend_pause() {
        if ! statusmsg=`run_rc_command status`; then
                @ECHO@ $statusmsg
                return 1
@@ -80,8 +75,7 @@
        kill -STOP $rc_pid
 }
 
-qmailsend_cont()
-{
+qmailsend_cont() {
        if ! statusmsg=`run_rc_command status`; then
                @ECHO@ $statusmsg
                return 1
@@ -90,8 +84,7 @@
        kill -CONT $rc_pid
 }
 
-qmailsend_doqueue()
-{
+qmailsend_doqueue() {
        if ! statusmsg=`run_rc_command status`; then
                @ECHO@ $statusmsg
                return 1
@@ -101,14 +94,12 @@
        kill -ALRM $rc_pid
 }
 
-qmailsend_queue()
-{
+qmailsend_queue() {
        @PREFIX@/bin/qmail-qstat
        @PREFIX@/bin/qmail-qread
 }
 
-qmailsend_hup()
-{
+qmailsend_hup() {
        run_rc_command reload
 }
 
diff -r bc7ada6e56f3 -r b75ed0987c84 mail/qmail-run/files/qmailsmtpd.sh
--- a/mail/qmail-run/files/qmailsmtpd.sh        Fri Dec 14 06:49:36 2018 +0000
+++ b/mail/qmail-run/files/qmailsmtpd.sh        Fri Dec 14 06:55:07 2018 +0000
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #



Home | Main Index | Thread Index | Old Index