diff options
author | schmonz <schmonz@pkgsrc.org> | 2018-12-14 06:55:07 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2018-12-14 06:55:07 +0000 |
commit | b8bfd355f1b7dc5d559fb97de625f6ea73f627e2 (patch) | |
tree | ea7a74b99d4bc8679f16ed632a26f2cc00dd228c /mail/qmail-run/files | |
parent | 9594821bae3a386f732c7e6a9b8f841af7253c6a (diff) | |
download | pkgsrc-b8bfd355f1b7dc5d559fb97de625f6ea73f627e2.tar.gz |
K&R-style braces in rc.d scripts. NFCI.
Diffstat (limited to 'mail/qmail-run/files')
-rw-r--r-- | mail/qmail-run/files/qmail.sh | 14 | ||||
-rw-r--r-- | mail/qmail-run/files/qmailofmipd.sh | 17 | ||||
-rw-r--r-- | mail/qmail-run/files/qmailpop3d.sh | 17 | ||||
-rw-r--r-- | mail/qmail-run/files/qmailqread.sh | 14 | ||||
-rw-r--r-- | mail/qmail-run/files/qmailsend.sh | 29 | ||||
-rw-r--r-- | mail/qmail-run/files/qmailsmtpd.sh | 17 |
6 files changed, 38 insertions, 70 deletions
diff --git a/mail/qmail-run/files/qmail.sh b/mail/qmail-run/files/qmail.sh index d3cfa336b4f..307153bc2de 100644 --- a/mail/qmail-run/files/qmail.sh +++ b/mail/qmail-run/files/qmail.sh @@ -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 @@ rcd_dir=`@DIRNAME@ $0` # 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 @@ reverse_commands() qmailrcd $REVCOMMAND_LIST } -qmailrcd() -{ +qmailrcd() { # Backward compat with NetBSD <1.6: [ -z "$rc_arg" ] && rc_arg=$_arg @@ -50,8 +47,7 @@ qmailrcd() 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 --git a/mail/qmail-run/files/qmailofmipd.sh b/mail/qmail-run/files/qmailofmipd.sh index f0195f9492f..b50c5288b50 100644 --- a/mail/qmail-run/files/qmailofmipd.sh +++ b/mail/qmail-run/files/qmailofmipd.sh @@ -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 @@ qmailofmipd_enable_tls() { fi } -qmailofmipd_precmd() -{ +qmailofmipd_precmd() { if [ -f /etc/rc.subr ] && ! checkyesno qmailofmipd_log; then qmailofmipd_logcmd=${qmailofmipd_nologcmd} fi @@ -106,13 +105,11 @@ ${qmailofmipd_preofmipd} ${qmailofmipd_ofmipdcmd} ${qmailofmipd_postofmipd} 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 @@ qmailofmipd_pause() kill -STOP $rc_pid } -qmailofmipd_cont() -{ +qmailofmipd_cont() { if ! statusmsg=`run_rc_command status`; then @ECHO@ $statusmsg return 1 @@ -137,8 +133,7 @@ qmailofmipd_needcdb() { [ -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 --git a/mail/qmail-run/files/qmailpop3d.sh b/mail/qmail-run/files/qmailpop3d.sh index 470985ead65..1d3bd1918a1 100644 --- a/mail/qmail-run/files/qmailpop3d.sh +++ b/mail/qmail-run/files/qmailpop3d.sh @@ -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 @@ qmailpop3d_enable_tls() { fi } -qmailpop3d_precmd() -{ +qmailpop3d_precmd() { if [ -f /etc/rc.subr ] && ! checkyesno qmailpop3d_log; then qmailpop3d_logcmd=${qmailpop3d_nologcmd} fi @@ -103,13 +102,11 @@ ${qmailpop3d_prepop3d} ${qmailpop3d_pop3dcmd} ${qmailpop3d_postpop3d} 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 @@ qmailpop3d_pause() kill -STOP $rc_pid } -qmailpop3d_cont() -{ +qmailpop3d_cont() { if ! statusmsg=`run_rc_command status`; then @ECHO@ $statusmsg return 1 @@ -134,8 +130,7 @@ qmailpop3d_needcdb() { [ -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 --git a/mail/qmail-run/files/qmailqread.sh b/mail/qmail-run/files/qmailqread.sh index 27d90c9ed42..6036d5018f0 100644 --- a/mail/qmail-run/files/qmailqread.sh +++ b/mail/qmail-run/files/qmailqread.sh @@ -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 @@ stat_cmd="qmailqread_stat" 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 @@ ${qmailqread_tcphost} ${qmailqread_tcpport} 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 @@ qmailqread_pause() kill -STOP $rc_pid } -qmailqread_cont() -{ +qmailqread_cont() { if ! statusmsg=`run_rc_command status`; then @ECHO@ $statusmsg return 1 diff --git a/mail/qmail-run/files/qmailsend.sh b/mail/qmail-run/files/qmailsend.sh index 14d913de0bc..e078d0be7e6 100644 --- a/mail/qmail-run/files/qmailsend.sh +++ b/mail/qmail-run/files/qmailsend.sh @@ -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 @@ alrm_cmd="qmailsend_doqueue" 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 @@ ${qmailsend_logcmd}" 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 @@ qmailsend_pause() kill -STOP $rc_pid } -qmailsend_cont() -{ +qmailsend_cont() { if ! statusmsg=`run_rc_command status`; then @ECHO@ $statusmsg return 1 @@ -90,8 +84,7 @@ qmailsend_cont() kill -CONT $rc_pid } -qmailsend_doqueue() -{ +qmailsend_doqueue() { if ! statusmsg=`run_rc_command status`; then @ECHO@ $statusmsg return 1 @@ -101,14 +94,12 @@ qmailsend_doqueue() 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 --git a/mail/qmail-run/files/qmailsmtpd.sh b/mail/qmail-run/files/qmailsmtpd.sh index bf3512e45ed..da94eef9011 100644 --- a/mail/qmail-run/files/qmailsmtpd.sh +++ b/mail/qmail-run/files/qmailsmtpd.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: qmailsmtpd.sh,v 1.25 2018/12/14 06:49:31 schmonz Exp $ +# $NetBSD: qmailsmtpd.sh,v 1.26 2018/12/14 06:55:07 schmonz Exp $ # # @PKGNAME@ script to control qmail-smtpd (SMTP service). # @@ -76,8 +76,7 @@ qmailsmtpd_enable_tls() { fi } -qmailsmtpd_precmd() -{ +qmailsmtpd_precmd() { if [ -f /etc/rc.subr ] && ! checkyesno qmailsmtpd_log; then qmailsmtpd_logcmd=${qmailsmtpd_nologcmd} fi @@ -102,13 +101,11 @@ ${qmailsmtpd_presmtpd} ${qmailsmtpd_smtpdcmd} ${qmailsmtpd_postsmtpd} rc_flags="" } -qmailsmtpd_stat() -{ +qmailsmtpd_stat() { run_rc_command status } -qmailsmtpd_pause() -{ +qmailsmtpd_pause() { if ! statusmsg=`run_rc_command status`; then @ECHO@ $statusmsg return 1 @@ -117,8 +114,7 @@ qmailsmtpd_pause() kill -STOP $rc_pid } -qmailsmtpd_cont() -{ +qmailsmtpd_cont() { if ! statusmsg=`run_rc_command status`; then @ECHO@ $statusmsg return 1 @@ -133,8 +129,7 @@ qmailsmtpd_needcdb() { [ -f "${_src}" -a "${_src}" -nt "${_dst}" ] || [ ! -f "${_dst}" ] } -qmailsmtpd_cdb() -{ +qmailsmtpd_cdb() { @ECHO@ "Reloading ${qmailsmtpd_tcprules}." @PREFIX@/bin/tcprules ${qmailsmtpd_tcprules}.cdb ${qmailsmtpd_tcprules}.tmp < ${qmailsmtpd_tcprules} @CHMOD@ 644 ${qmailsmtpd_tcprules}.cdb |