Scriptlets replaced with new systemd macros

This commit is contained in:
Vitezslav Crhonek 2012-08-23 11:01:03 +02:00
parent 501165f27f
commit 0b8c8cb691

View File

@ -8,7 +8,7 @@
Name: tog-pegasus
Version: %{major_ver}.1
Release: 9%{?dist}
Release: 10%{?dist}
Epoch: 2
Summary: OpenPegasus WBEM Services for Linux
@ -345,6 +345,7 @@ fi
install -d -m 1750 -o root -g pegasus /var/run/tog-pegasus
restorecon /var/run/tog-pegasus
/sbin/ldconfig;
%systemd_post tog-pegasus.service
if [ $1 -ge 1 ]; then
echo `date` >> /var/lib/Pegasus/log/install.log 2>&1 || :;
if [ $1 -eq 1 ] ; then
@ -355,7 +356,6 @@ if [ $1 -ge 1 ]; then
/usr/share/Pegasus/scripts/genOpenPegasusSSLCerts
fi;
fi;
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
if [ $1 -gt 1 ]; then
if [ -d /var/lib/Pegasus/prev_repository ]; then
@ -370,21 +370,16 @@ fi
:;
%preun
%systemd_preun stop tog-pegasus.service
if [ $1 -eq 0 ]; then
# Package removal, not upgrade
/bin/systemctl --no-reload disable tog-pegasus.service > /dev/null 2>&1 || :
/bin/systemctl stop tog-pegasus.service > /dev/null 2>&1 || :
rm -rf /var/run/tog-pegasus
fi
:;
%postun
/sbin/ldconfig
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart tog-pegasus.service >/dev/null 2>&1 || :
fi
%systemd_postun_with_restart tog-pegasus.service
%preun devel
if [ $1 -eq 0 ] ; then
@ -439,6 +434,9 @@ fi
%changelog
* Wed Aug 22 2012 Lukáš Nykrýn <lnykryn@redhat.com> - 2:2.11.1-10
- Scriptlets replaced with new systemd macros (#850411)
* Tue Jul 31 2012 Vitezslav Crhonek <vcrhonek@redhat.com> - 2:2.11.1-9
- Fix security context of /var/run/tog-pegasus in post install scriptlet