Fixed systemctl disable command in preun section

Replaced reload by restart, dropped ExecReload from sendmail.service
Resolves: rhbz#719931
Switched to systemctl in NetworkManager dispatcher script
Added ExecStartPre=-/etc/mail/make to sm-client.service
Hardcoded daemon option (-bd) to sendmail.service, dropped the DAEMON var
QUEUE var in /etc/sysconfig/sendmail replaced by SENDMAIL_OPTS var
Added default preset (-q1h) to SENDMAIL_OPTS var
This commit is contained in:
Jaroslav Škarvada 2011-07-25 16:16:30 +02:00
parent 6ae4af377b
commit a25ef5c937
5 changed files with 20 additions and 10 deletions

View File

@ -2,6 +2,6 @@
case "$2" in
up|down|vpn-up|vpn-down)
/sbin/service sendmail reload || :
/bin/systemctl restart sendmail.service || :
;;
esac

View File

@ -7,12 +7,11 @@ Wants=sm-client.service
[Service]
Type=forking
PIDFile=/run/sendmail.pid
Environment=SENDMAIL_OPTS=-q1h
EnvironmentFile=-/etc/sysconfig/sendmail
ExecStartPre=-/etc/mail/make
ExecStartPre=-/etc/mail/make aliases
ExecStart=/usr/sbin/sendmail $DAEMON $QUEUE $SENDMAIL_OPTARG
ExecReload=-/etc/mail/make
ExecReload=-/etc/mail/make aliases
ExecStart=/usr/sbin/sendmail -bd $SENDMAIL_OPTS $SENDMAIL_OPTARG
[Install]
WantedBy=multi-user.target

View File

@ -14,7 +14,7 @@
Summary: A widely used Mail Transport Agent (MTA)
Name: sendmail
Version: 8.14.5
Release: 5%{?dist}
Release: 6%{?dist}
License: Sendmail
Group: System Environment/Daemons
URL: http://www.sendmail.org/
@ -531,9 +531,9 @@ exit 0
%preun
if [ $1 = 0 ]; then
/bin/systemctl --no-reload sendmail.service > /dev/null 2>&1 || :
/bin/systemctl --no-reload disable sendmail.service > /dev/null 2>&1 || :
/bin/systemctl stop sendmail.service > /dev/null 2>&1 || :
/bin/systemctl --no-reload sm-client.service > /dev/null 2>&1 || :
/bin/systemctl --no-reload disable sm-client.service > /dev/null 2>&1 || :
/bin/systemctl stop sm-client.service > /dev/null 2>&1 || :
%{_sbindir}/alternatives --remove mta %{_sbindir}/sendmail.sendmail
fi
@ -676,6 +676,16 @@ exit 0
%changelog
* Mon Jul 25 2011 Jaroslav Škarvada <jskarvad@redhat.com> - 8.14.5-6
- Fixed systemctl disable command in preun section
- Replaced reload by restart, dropped ExecReload from sendmail.service
Resolves: rhbz#719931
- Switched to systemctl in NetworkManager dispatcher script
- Added ExecStartPre=-/etc/mail/make to sm-client.service
- Hardcoded daemon option (-bd) to sendmail.service, dropped the DAEMON var
- QUEUE var in /etc/sysconfig/sendmail replaced by SENDMAIL_OPTS var
- Added default preset (-q1h) to SENDMAIL_OPTS var
* Fri Jul 22 2011 Jaroslav Škarvada <jskarvad@redhat.com> - 8.14.5-5
- Fixed SMTP AUTH over TLS in case of two AUTH lines
Resolves: rhbz#716628

View File

@ -1,2 +1 @@
DAEMON="-bd"
QUEUE="-q1h"
SENDMAIL_OPTS="-q1h"

View File

@ -6,11 +6,13 @@ Wants=sendmail.service
[Service]
Type=forking
PIDFile=/run/sm-client.pid
Environment=SENDMAIL_OPTS=-q1h
EnvironmentFile=-/etc/sysconfig/sendmail
ExecStartPre=/bin/touch /run/sm-client.pid
ExecStartPre=/bin/chown smmsp:smmsp /run/sm-client.pid
ExecStartPre=-/sbin/restorecon /run/sm-client.pid
ExecStart=/usr/sbin/sendmail -L sm-msp-queue -Ac $QUEUE $SENDMAIL_OPTARG
ExecStartPre=-/etc/mail/make
ExecStart=/usr/sbin/sendmail -L sm-msp-queue -Ac $SENDMAIL_OPTS $SENDMAIL_OPTARG
[Install]
WantedBy=multi-user.target