Scriptlets replaced with new systemd macros (#850173).

This commit is contained in:
Ryan O'Hara 2013-01-02 10:42:31 -06:00
parent 90e5aa33fe
commit 8775ed774f

View File

@ -1,7 +1,7 @@
Summary: High Availability monitor built upon LVS, VRRP and service pollers Summary: High Availability monitor built upon LVS, VRRP and service pollers
Name: keepalived Name: keepalived
Version: 1.2.7 Version: 1.2.7
Release: 1%{?dist} Release: 2%{?dist}
License: GPLv2+ License: GPLv2+
Group: Applications/System Group: Applications/System
URL: http://www.keepalived.org/ URL: http://www.keepalived.org/
@ -78,24 +78,13 @@ if ! grep -q "IPVS_SUPPORT='_WITH_LVS_'" config.log; then
fi fi
%post %post
if [ $1 -eq 1 ] ; then %systemd_post keepalived.service
# Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%preun %preun
if [ $1 -eq 0 ] ; then %systemd_preun keepalived.service
# Package removal, not upgrade
/bin/systemctl --no-reload disable keepalived.service > /dev/null 2>&1 || :
/bin/systemctl stop keepalived.service > /dev/null 2>&1 || :
fi
%postun %postun
/bin/systemctl daemon-reload >/dev/null 2>&1 || : %systemd_postun_with_restart keepalived.service
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart keepalived.service >/dev/null 2>&1 || :
fi
%triggerun -- keepalived < 1.2.2-3 %triggerun -- keepalived < 1.2.2-3
# Save the current service runlevel info # Save the current service runlevel info
@ -123,6 +112,9 @@ fi
%changelog %changelog
* Mon Sep 24 2012 Václav Pavlín <vpavlin@redhat.com> - 1.2.7-2
- Scriptlets replaced with new systemd macros (#850173)
* Tue Sep 04 2012 Ryan O'Hara <rohara@redhat.com> - 1.2.7-1 * Tue Sep 04 2012 Ryan O'Hara <rohara@redhat.com> - 1.2.7-1
- Update to 1.2.7. - Update to 1.2.7.
- Fix systemd service file (#769726). - Fix systemd service file (#769726).