- follow guidelines for alternatives (#570800)
- fix init script LSB compliance (#523238) - handle undefined NETWORKING in init script (#483528)
This commit is contained in:
parent
b7b8814988
commit
15a096b486
30
exim.init
30
exim.init
|
@ -23,11 +23,6 @@ else
|
||||||
QUEUE=1h
|
QUEUE=1h
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check that networking is up.
|
|
||||||
[ ${NETWORKING} = "no" ] && exit 0
|
|
||||||
|
|
||||||
[ -f /usr/sbin/exim ] || exit 0
|
|
||||||
|
|
||||||
gen_cert() {
|
gen_cert() {
|
||||||
if [ ! -f /etc/pki/tls/certs/exim.pem ] ; then
|
if [ ! -f /etc/pki/tls/certs/exim.pem ] ; then
|
||||||
umask 077
|
umask 077
|
||||||
|
@ -59,6 +54,10 @@ EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ "$EUID" != "0" ] && exit 4
|
||||||
|
[ "${NETWORKING}" = "no" ] && exit 1
|
||||||
|
[ -f /usr/sbin/exim ] || exit 5
|
||||||
|
|
||||||
# check ownerships
|
# check ownerships
|
||||||
# do this by seeing if /var/log/exim/main.log exists and is
|
# do this by seeing if /var/log/exim/main.log exists and is
|
||||||
# owned by exim - if owned by someone else we fix it up
|
# owned by exim - if owned by someone else we fix it up
|
||||||
|
@ -83,6 +82,7 @@ start() {
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
|
[ "$EUID" != "0" ] && exit 4
|
||||||
# Stop daemons.
|
# Stop daemons.
|
||||||
echo -n $"Shutting down exim: "
|
echo -n $"Shutting down exim: "
|
||||||
killproc exim
|
killproc exim
|
||||||
|
@ -107,22 +107,22 @@ case "$1" in
|
||||||
restart)
|
restart)
|
||||||
restart
|
restart
|
||||||
;;
|
;;
|
||||||
reload)
|
reload|force-reload)
|
||||||
if [ -f /var/lock/subsys/exim ]; then
|
status exim > /dev/null || exit 7
|
||||||
echo -n $"Reloading exim:"
|
echo -n $"Reloading exim:"
|
||||||
killproc exim -HUP
|
killproc exim -HUP
|
||||||
echo
|
echo
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
condrestart)
|
condrestart|try-restart)
|
||||||
[ -f /var/lock/subsys/exim ] && restart || :
|
status exim > /dev/null || exit 0
|
||||||
|
restart
|
||||||
;;
|
;;
|
||||||
status)
|
status)
|
||||||
status exim
|
status exim
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo $"Usage: $0 {start|stop|restart|reload|status|condrestart}"
|
echo $"Usage: $0 {start|stop|restart|reload|force-reload|status|condrestart|try-restart}"
|
||||||
exit 1
|
exit 2
|
||||||
esac
|
esac
|
||||||
|
|
||||||
exit $RETVAL
|
exit $RETVAL
|
||||||
|
|
28
exim.spec
28
exim.spec
|
@ -12,13 +12,12 @@
|
||||||
Summary: The exim mail transfer agent
|
Summary: The exim mail transfer agent
|
||||||
Name: exim
|
Name: exim
|
||||||
Version: 4.71
|
Version: 4.71
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Url: http://www.exim.org/
|
Url: http://www.exim.org/
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
Provides: MTA smtpd smtpdaemon server(smtp) /usr/bin/newaliases
|
Provides: MTA smtpd smtpdaemon server(smtp)
|
||||||
Provides: /usr/sbin/sendmail /usr/bin/mailq /usr/bin/rmail
|
|
||||||
Requires(post): /sbin/chkconfig /sbin/service %{_sbindir}/alternatives
|
Requires(post): /sbin/chkconfig /sbin/service %{_sbindir}/alternatives
|
||||||
Requires(preun): /sbin/chkconfig /sbin/service %{_sbindir}/alternatives
|
Requires(preun): /sbin/chkconfig /sbin/service %{_sbindir}/alternatives
|
||||||
Requires(pre): %{_sbindir}/groupadd, %{_sbindir}/useradd
|
Requires(pre): %{_sbindir}/groupadd, %{_sbindir}/useradd
|
||||||
|
@ -292,6 +291,14 @@ mkdir -p $RPM_BUILD_ROOT/etc/pki/tls/{certs,private}
|
||||||
touch $RPM_BUILD_ROOT/etc/pki/tls/{certs,private}/exim.pem
|
touch $RPM_BUILD_ROOT/etc/pki/tls/{certs,private}/exim.pem
|
||||||
chmod 600 $RPM_BUILD_ROOT/etc/pki/tls/{certs,private}/exim.pem
|
chmod 600 $RPM_BUILD_ROOT/etc/pki/tls/{certs,private}/exim.pem
|
||||||
|
|
||||||
|
# generate alternatives ghosts
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
|
||||||
|
for i in %{_sbindir}/sendmail %{_bindir}/{mailq,runq,rsmtp,rmail,newaliases} \
|
||||||
|
/usr/lib/sendmail %{_sysconfdir}/pam.d/smtp %{_mandir}/man1/mailq.1.gz
|
||||||
|
do
|
||||||
|
touch $RPM_BUILD_ROOT$i
|
||||||
|
done
|
||||||
|
|
||||||
%if 0%{?buildclam}
|
%if 0%{?buildclam}
|
||||||
# Munge the clamav init and config files from clamav-devel. This really ought
|
# Munge the clamav init and config files from clamav-devel. This really ought
|
||||||
# to be a subpackage of clamav, but this hack will have to do for now.
|
# to be a subpackage of clamav, but this hack will have to do for now.
|
||||||
|
@ -430,6 +437,16 @@ fi
|
||||||
%attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) /etc/pki/tls/certs/exim.pem
|
%attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) /etc/pki/tls/certs/exim.pem
|
||||||
%attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) /etc/pki/tls/private/exim.pem
|
%attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) /etc/pki/tls/private/exim.pem
|
||||||
|
|
||||||
|
%attr(0755,root,root) %ghost %{_sbindir}/sendmail
|
||||||
|
%attr(0755,root,root) %ghost %{_bindir}/mailq
|
||||||
|
%attr(0755,root,root) %ghost %{_bindir}/runq
|
||||||
|
%attr(0755,root,root) %ghost %{_bindir}/rsmtp
|
||||||
|
%attr(0755,root,root) %ghost %{_bindir}/rmail
|
||||||
|
%attr(0755,root,root) %ghost %{_bindir}/newaliases
|
||||||
|
%attr(0755,root,root) %ghost /usr/lib/sendmail
|
||||||
|
%ghost %{_sysconfdir}/pam.d/smtp
|
||||||
|
%ghost %{_mandir}/man1/mailq.1.gz
|
||||||
|
|
||||||
%files mysql
|
%files mysql
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_libdir}/exim/%{version}-%{release}/lookups/mysql.so
|
%{_libdir}/exim/%{version}-%{release}/lookups/mysql.so
|
||||||
|
@ -484,6 +501,11 @@ test "$1" = 0 || %{_initrddir}/clamd.exim condrestart >/dev/null || :
|
||||||
%{_sysconfdir}/cron.daily/greylist-tidy.sh
|
%{_sysconfdir}/cron.daily/greylist-tidy.sh
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Mar 18 2010 Miroslav Lichvar <mlichvar@redhat.com> - 4.71-3
|
||||||
|
- follow guidelines for alternatives (#570800)
|
||||||
|
- fix init script LSB compliance (#523238)
|
||||||
|
- handle undefined NETWORKING in init script (#483528)
|
||||||
|
|
||||||
* Tue Feb 09 2010 Adam Jackson <ajax@redhat.com> 4.71-2
|
* Tue Feb 09 2010 Adam Jackson <ajax@redhat.com> 4.71-2
|
||||||
- Fix FTBFS with --no-add-needed
|
- Fix FTBFS with --no-add-needed
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue