diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2014-08-10 19:25:28 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-08-14 13:32:15 +0200 |
commit | c3fd0123258be6392a4ce02017c6a299069ddf0d (patch) | |
tree | ccfef5ddc15e900e21f8312ae1cf4156397cfe1c | |
parent | a2d44bee6630970be4a20ec2a3b3cbc94c0a44bd (diff) | |
download | sssd-c3fd0123258be6392a4ce02017c6a299069ddf0d.tar.gz sssd-c3fd0123258be6392a4ce02017c6a299069ddf0d.tar.xz sssd-c3fd0123258be6392a4ce02017c6a299069ddf0d.zip |
RPM: Restart service in %posttrans, not %post
When upgrading from a 1.9 version with monolithic packaging to 1.10 or
later with per-provider subpackage, sssd-common can be upgraded (and
restarted) before the new sssd-$provider is restarted. This can lead to
a startup failure, because the sssd_be process from already upgraded
sssd-common would attempt to load a sssd_$provider.so from the
legacy sssd package.
Restarting the service in %posttrans makes sure all the packages are in
place when we restart the service.
Resolves:
https://fedorahosted.org/sssd/ticket/2399
(cherry picked from commit 192027debeaa991690160c3cb68480fe54ad8fdf)
-rw-r--r-- | contrib/sssd.spec.in | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in index 4a3c402c3..ce6800f20 100644 --- a/contrib/sssd.spec.in +++ b/contrib/sssd.spec.in @@ -779,9 +779,8 @@ fi %post common /sbin/chkconfig --add %{servicename} -if [ $1 -ge 1 ] ; then - /sbin/service %{servicename} condrestart 2>&1 > /dev/null -fi +%posttrans +/sbin/service %{servicename} condrestart 2>&1 > /dev/null %preun common if [ $1 = 0 ]; then |