From 96f34b16a6c27417be91fa46ff00883ca3396fcedf98491f644ece14571766b8 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 11 Aug 2014 00:18:49 +0000 Subject: [PATCH] put cache killer right before restart operation sysv restart OBS-URL: https://build.opensuse.org/package/show/network:ldap/sssd?expand=0&rev=123 --- sssd.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sssd.spec b/sssd.spec index 11326b7..e4b7be0 100644 --- a/sssd.spec +++ b/sssd.spec @@ -397,8 +397,6 @@ rm -Rf "$b/%_sysconfdir/dbus-1" "$b/%_datadir/dbus-1" %if 0%{?_unitdir:1} %service_add_post sssd.service %endif -# Clear caches, which may have an incompatible format after (especially) downgrade -rm -f /var/lib/sss/db/*.ldb %if 0%{?_unitdir:1} %preun @@ -411,8 +409,15 @@ if [ "$1" == "0" ]; then fi; /sbin/ldconfig %if 0%{?_unitdir:1} +# Clear caches, which may have an incompatible format afterwards +# (especially, downgrades) +rm -f /var/lib/sss/db/*.ldb +# del_postun includes a try-restart %service_del_postun sssd.service +%else +%restart_on_update sssd %endif +%insserv_cleanup %post -n libipa_hbac0 -p /sbin/ldconfig %postun -n libipa_hbac0 -p /sbin/ldconfig