--- etc/defaults/rc.conf (revision 295622) +++ etc/defaults/rc.conf (working copy) @@ -579,7 +579,10 @@ # Flags for sendmail_msp_queue daemon. sendmail_rebuild_aliases="NO" # Run newaliases if necessary (YES/NO). +# Settings for dma(8) +dma_flushq_enable="NO" # Flush dma(8) queue on startup and shutdown + ############################################################## ### Miscellaneous administrative options ################### ############################################################## --- etc/rc.d/Makefile (revision 295622) +++ etc/rc.d/Makefile (working copy) @@ -184,6 +184,10 @@ FILES+= ccd .endif +.if ${MK_DMAGENT} != "no" +FILES+= dma_flushq +.endif + .if ${MK_FTP} != "no" FILES+= ftpd .endif --- etc/rc.d/dma_flushq (nonexistent) +++ etc/rc.d/dma_flushq (working copy) @@ -0,0 +1,32 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: dma mail +# REQUIRE: LOGIN cleanvar +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable dma mailq flushing on +# startup or before shutdown: +# dma_flushq_enable (bool): Set it to "YES" to flush mailq on startup +# or before shutdown +# Default is "NO". +# + +. /etc/rc.subr + +name="dma_flushq" +rcvar=dma_flushq_enable + +load_rc_config ${name} + +: ${dma_flushq_enable:="NO"} + +start_cmd=${name} +stop_cmd=${name} + +dma_flushq() { + /usr/libexec/dma -q +} + +run_rc_command "$1" --- tools/build/mk/OptionalObsoleteFiles.inc (revision 295622) +++ tools/build/mk/OptionalObsoleteFiles.inc (working copy) @@ -1845,6 +1845,7 @@ .if ${MK_DMAGENT} == no OLD_FILES+=etc/dma/dma.conf +OLD_FILES+=etc/rc.d/dma_flushq OLD_FILES+=usr/libexec/dma OLD_FILES+=usr/libexec/dma-mbox-create OLD_FILES+=usr/share/man/man8/dma.8.gz