From 6df7ec09c17c3be8bfadff125daaf7a5738d1436 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 1 Jul 2013 12:19:01 -0400 Subject: Move pre and post scripts to sssd-common --- contrib/sssd.spec.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in index bee93909..fd19f7cc 100644 --- a/contrib/sssd.spec.in +++ b/contrib/sssd.spec.in @@ -718,20 +718,20 @@ rm -rf $RPM_BUILD_ROOT %if (0%{?use_systemd} == 1) # systemd -%post +%post common if [ $1 -eq 1 ] ; then # Initial installation /bin/systemctl daemon-reload >/dev/null 2>&1 || : fi -%preun +%preun common if [ $1 -eq 0 ] ; then # Package removal, not upgrade /bin/systemctl --no-reload disable sssd.service > /dev/null 2>&1 || : /bin/systemctl stop sssd.service > /dev/null 2>&1 || : fi -%postun +%postun common /bin/systemctl daemon-reload >/dev/null 2>&1 || : if [ $1 -ge 1 ] ; then # Package upgrade, not uninstall @@ -752,14 +752,14 @@ fi /bin/systemctl try-restart sssd.service >/dev/null 2>&1 || : %else # sysv -%post +%post common /sbin/chkconfig --add %{servicename} if [ $1 -ge 1 ] ; then /sbin/service %{servicename} condrestart 2>&1 > /dev/null fi -%preun +%preun common if [ $1 = 0 ]; then /sbin/service %{servicename} stop 2>&1 > /dev/null /sbin/chkconfig --del %{servicename} -- cgit