diff options
author | Eray Aslan <eras@gentoo.org> | 2012-03-06 15:03:53 +0000 |
---|---|---|
committer | Eray Aslan <eras@gentoo.org> | 2012-03-06 15:03:53 +0000 |
commit | 8e4c758f4ad2b54760bed0af23f2a633b9502646 (patch) | |
tree | 6437a2060089f6ddf744d73405316d518a08dd6c /mail-mta | |
parent | Cleanup (diff) | |
download | gentoo-2-8e4c758f4ad2b54760bed0af23f2a633b9502646.tar.gz gentoo-2-8e4c758f4ad2b54760bed0af23f2a633b9502646.tar.bz2 gentoo-2-8e4c758f4ad2b54760bed0af23f2a633b9502646.zip |
add checking to start() in init script
(Portage version: 2.1.10.49/cvs/Linux x86_64)
Diffstat (limited to 'mail-mta')
-rw-r--r-- | mail-mta/postfix/ChangeLog | 5 | ||||
-rw-r--r-- | mail-mta/postfix/files/postfix.rc6.2.7 | 81 |
2 files changed, 85 insertions, 1 deletions
diff --git a/mail-mta/postfix/ChangeLog b/mail-mta/postfix/ChangeLog index bbea67da3e74..f3e9e5bfe0db 100644 --- a/mail-mta/postfix/ChangeLog +++ b/mail-mta/postfix/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for mail-mta/postfix # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.341 2012/03/06 13:12:55 eras Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.342 2012/03/06 15:03:53 eras Exp $ + + 06 Mar 2012; Eray Aslan <eras@gentoo.org> +files/postfix.rc6.2.7: + add checking to start() in init script *postfix-2.10_pre20120305 (06 Mar 2012) *postfix-2.8.9 (06 Mar 2012) diff --git a/mail-mta/postfix/files/postfix.rc6.2.7 b/mail-mta/postfix/files/postfix.rc6.2.7 new file mode 100644 index 000000000000..151617360e6b --- /dev/null +++ b/mail-mta/postfix/files/postfix.rc6.2.7 @@ -0,0 +1,81 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/files/postfix.rc6.2.7,v 1.1 2012/03/06 15:03:53 eras Exp $ + +# Please read http://www.postfix.org/MULTI_INSTANCE_README.html for multi instance support + +CONF_DIR="/etc/postfix" +CONF_OPT="${SVCNAME##*.}" +if [ -n ${CONF_OPT} -a ${SVCNAME} != "postfix" ]; then + CONF_DIR="${CONF_DIR}.${CONF_OPT}" +fi +if [ "${CONF_DIR}" = "/etc/postfix" ]; then + CONF_PARAM="" + CONF_MESSAGE="" +else + CONF_PARAM="-c ${CONF_DIR}" + CONF_MESSAGE="(${CONF_DIR})" +fi + +extra_started_commands="reload abort flush" + +description_reload="Re-read configuration files. Running processes terminate at their earliest convenience." +description_abort="Stop the Postfix mail system abruptly. Running processes are signaled to stop immediately." +description_flush="Force delivery: attempt to deliver every message in the deferred mail queue." + +depend() { + use logger dns ypbind amavisd antivirus postfix_greylist net saslauthd + if [ "${SVCNAME}" = "postfix" ]; then + provide mta + fi +} + +start() { + local _retval + if [ ! -z "${CONF_PARAM}" ]; then + einfo "Please consider updating your config for postmulti support." + fi + ebegin "Starting postfix ${CONF_MESSAGE}" + if [ ! -d ${CONF_DIR} ]; then + eend 1 "${CONF_DIR} does not exist" + return 1 + fi + /usr/sbin/postfix ${CONF_PARAM} start >/dev/null 2>&1 + _retval=$? + # check that master started correctly + if [ "${_retval}" ]; then + sleep 1 + /usr/sbin/postfix ${CONF_PARAM} status >/dev/null 2>&1 + _retval=$? + fi + eend "${_retval}" +} + +stop() { + ebegin "Stopping postfix ${CONF_MESSAGE}" + /usr/sbin/postfix ${CONF_PARAM} stop >/dev/null 2>&1 + eend $? +} + +reload() { + ebegin "Reloading postfix ${CONF_MESSAGE}" + /usr/sbin/postfix ${CONF_PARAM} reload >/dev/null 2>&1 + eend $? +} + +abort() { + ebegin "Aborting postfix ${CONF_MESSAGE}" + + if service_started "${SVCNAME}"; then + mark_service_stopped "${SVCNAME}" + fi + /usr/sbin/postfix ${CONF_PARAM} abort >/dev/null 2>&1 + eend $? +} + +flush() { + ebegin "Flushing postfix ${CONF_MESSAGE}" + /usr/sbin/postfix ${CONF_PARAM} flush >/dev/null 2>&1 + eend $? +} |