- 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:
-------------------------------
/usr/share/doc/postfix-<version>/README_FILES/SASL_README
Local configuration examples:
/usr/share/doc/postfix-*/samples

View File

@ -16,23 +16,37 @@
# 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.
### 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.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /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
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() {
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 1
conf_check
# Start daemons.
echo -n $"Starting postfix: "
/usr/bin/newaliases >/dev/null 2>&1
@ -44,6 +58,7 @@ start() {
}
stop() {
conf_check
# Stop daemons.
echo -n $"Shutting down postfix: "
/usr/sbin/postfix stop 2>/dev/null 1>&2 && success || failure $"$prog stop"
@ -54,6 +69,7 @@ stop() {
}
reload() {
conf_check
echo -n $"Reloading postfix: "
/usr/sbin/postfix reload 2>/dev/null 1>&2 && success || failure $"$prog reload"
RETVAL=$?
@ -62,38 +78,39 @@ reload() {
}
abort() {
conf_check
/usr/sbin/postfix abort 2>/dev/null 1>&2 && success || failure $"$prog abort"
return $?
}
flush() {
conf_check
/usr/sbin/postfix flush 2>/dev/null 1>&2 && success || failure $"$prog flush"
return $?
}
check() {
conf_check
/usr/sbin/postfix check 2>/dev/null 1>&2 && success || failure $"$prog check"
return $?
}
restart() {
stop
start
}
# See how we were called.
case "$1" in
start)
[ $running -eq 0 ] && exit 0
start
;;
stop)
[ $running -eq 0 ] || exit 0
stop
;;
restart)
restart|force-reload)
stop
start
;;
reload)
[ $running -eq 0 ] || exit 7
reload
;;
abort)
@ -109,11 +126,13 @@ case "$1" in
status master
;;
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}"
exit 1
exit 2
esac
exit $?

View File

@ -39,7 +39,7 @@
Name: postfix
Summary: Postfix Mail Transport Agent
Version: 2.4.5
Release: 1%{?dist}
Release: 2%{?dist}
Epoch: 2
Group: System Environment/Daemons
URL: http://www.postfix.org
@ -466,6 +466,10 @@ exit 0
%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
- new version 2.4.5
- fixed compile proplem with glibc-2.6.90+