From 192027debeaa991690160c3cb68480fe54ad8fdf Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Sun, 10 Aug 2014 19:25:28 +0200 Subject: 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 --- contrib/sssd.spec.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in index 82d8e895..1429c263 100644 --- a/contrib/sssd.spec.in +++ b/contrib/sssd.spec.in @@ -848,9 +848,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 -- cgit