- made init script lsb conform (#243286, rhbz#247025)

- added link to postfix sasl readme into Postfix-SASL-RedHat readme
This commit is contained in:
Thomas Woerner 2007-10-04 13:39:00 +00:00
parent 236d5ac1d5
commit 9025eb33eb
3 changed files with 41 additions and 16 deletions

View File

@ -458,6 +458,8 @@ and Mozilla.
Other Sources of Documentation: Other Sources of Documentation:
------------------------------- -------------------------------
/usr/share/doc/postfix-<version>/README_FILES/SASL_README
Local configuration examples: Local configuration examples:
/usr/share/doc/postfix-*/samples /usr/share/doc/postfix-*/samples

View File

@ -16,23 +16,37 @@
# 20/01/01: Changes to fall in line with RedHat 7.0 style # 20/01/01: Changes to fall in line with RedHat 7.0 style
# 23/02/01: Fix a few untidy problems with help from Daniel Roesen. # 23/02/01: Fix a few untidy problems with help from Daniel Roesen.
### BEGIN INIT INFO
# Provides: postfix MTA
# Required-Start: $local_fs $network $remote_fs
# Required-Stop: $local_fs $network $remote_fs
# Short-Description: start and stop postfix
# Description: Postfix is a Mail Transport Agent, which is the program that
# moves mail from one machine to another.
### END INIT INFO
# Source function library. # Source function library.
. /etc/rc.d/init.d/functions . /etc/rc.d/init.d/functions
# Source networking configuration. # Source networking configuration.
. /etc/sysconfig/network . /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
[ -x /usr/sbin/postfix ] || exit 0
[ -d /etc/postfix ] || exit 0
[ -d /var/spool/postfix ] || exit 0
RETVAL=0 RETVAL=0
prog="postfix" prog="postfix"
status master >/dev/null 2>&1
running=$?
conf_check() {
[ -x /usr/sbin/postfix ] || exit 5
[ -d /etc/postfix ] || exit 6
[ -d /var/spool/postfix ] || exit 5
}
start() { start() {
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 1
conf_check
# Start daemons. # Start daemons.
echo -n $"Starting postfix: " echo -n $"Starting postfix: "
/usr/bin/newaliases >/dev/null 2>&1 /usr/bin/newaliases >/dev/null 2>&1
@ -44,6 +58,7 @@ start() {
} }
stop() { stop() {
conf_check
# Stop daemons. # Stop daemons.
echo -n $"Shutting down postfix: " echo -n $"Shutting down postfix: "
/usr/sbin/postfix stop 2>/dev/null 1>&2 && success || failure $"$prog stop" /usr/sbin/postfix stop 2>/dev/null 1>&2 && success || failure $"$prog stop"
@ -54,6 +69,7 @@ stop() {
} }
reload() { reload() {
conf_check
echo -n $"Reloading postfix: " echo -n $"Reloading postfix: "
/usr/sbin/postfix reload 2>/dev/null 1>&2 && success || failure $"$prog reload" /usr/sbin/postfix reload 2>/dev/null 1>&2 && success || failure $"$prog reload"
RETVAL=$? RETVAL=$?
@ -62,38 +78,39 @@ reload() {
} }
abort() { abort() {
conf_check
/usr/sbin/postfix abort 2>/dev/null 1>&2 && success || failure $"$prog abort" /usr/sbin/postfix abort 2>/dev/null 1>&2 && success || failure $"$prog abort"
return $? return $?
} }
flush() { flush() {
conf_check
/usr/sbin/postfix flush 2>/dev/null 1>&2 && success || failure $"$prog flush" /usr/sbin/postfix flush 2>/dev/null 1>&2 && success || failure $"$prog flush"
return $? return $?
} }
check() { check() {
conf_check
/usr/sbin/postfix check 2>/dev/null 1>&2 && success || failure $"$prog check" /usr/sbin/postfix check 2>/dev/null 1>&2 && success || failure $"$prog check"
return $? return $?
} }
restart() {
stop
start
}
# See how we were called. # See how we were called.
case "$1" in case "$1" in
start) start)
[ $running -eq 0 ] && exit 0
start start
;; ;;
stop) stop)
[ $running -eq 0 ] || exit 0
stop stop
;; ;;
restart) restart|force-reload)
stop stop
start start
;; ;;
reload) reload)
[ $running -eq 0 ] || exit 7
reload reload
;; ;;
abort) abort)
@ -109,11 +126,13 @@ case "$1" in
status master status master
;; ;;
condrestart) condrestart)
[ -f /var/lock/subsys/postfix ] && restart || : [ $running -eq 0 ] || exit 0
stop
start
;; ;;
*) *)
echo $"Usage: $0 {start|stop|restart|reload|abort|flush|check|status|condrestart}" echo $"Usage: $0 {start|stop|restart|reload|abort|flush|check|status|condrestart}"
exit 1 exit 2
esac esac
exit $? exit $?

View File

@ -39,7 +39,7 @@
Name: postfix Name: postfix
Summary: Postfix Mail Transport Agent Summary: Postfix Mail Transport Agent
Version: 2.4.5 Version: 2.4.5
Release: 1%{?dist} Release: 2%{?dist}
Epoch: 2 Epoch: 2
Group: System Environment/Daemons Group: System Environment/Daemons
URL: http://www.postfix.org URL: http://www.postfix.org
@ -466,6 +466,10 @@ exit 0
%changelog %changelog
* Thu Oct 4 2007 Thomas Woerner <twoerner@redhat.com> 2:2.4.5-2
- made init script lsb conform (#243286, rhbz#247025)
- added link to postfix sasl readme into Postfix-SASL-RedHat readme
* Mon Aug 13 2007 Thomas Woerner <twoerner@redhat.com> 2:2.4.5-1 * Mon Aug 13 2007 Thomas Woerner <twoerner@redhat.com> 2:2.4.5-1
- new version 2.4.5 - new version 2.4.5
- fixed compile proplem with glibc-2.6.90+ - fixed compile proplem with glibc-2.6.90+