use systemd macros (#850166)

This commit is contained in:
Jiri Popelka 2014-01-09 16:14:01 +01:00
parent b848c2b54c
commit 52081b603c

View File

@ -148,25 +148,14 @@ rm -rf %{buildroot}
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%post services %post services
if [ $1 -eq 1 ] ; then # Initial installation %systemd_post iptables.service ip6tables.service
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%preun services %preun services
if [ $1 -eq 0 ]; then # Package removal, not upgrade %systemd_preun iptables.service ip6tables.service
/bin/systemctl --no-reload disable iptables.service > /dev/null 2>&1 || :
/bin/systemctl --no-reload disable ip6tables.service > /dev/null 2>&1 || :
/bin/systemctl stop iptables.service > /dev/null 2>&1 || :
/bin/systemctl stop ip6tables.service > /dev/null 2>&1 || :
fi
%postun services %postun services
/sbin/ldconfig /sbin/ldconfig
/bin/systemctl daemon-reload >/dev/null 2>&1 || : %systemd_postun_with_restart iptables.service ip6tables.service
if [ $1 -ge 1 ] ; then # Package upgrade, not uninstall
/bin/systemctl try-restart iptables.service >/dev/null 2>&1 || :
/bin/systemctl try-restart ip6tables.service >/dev/null 2>&1 || :
fi
%triggerun -- iptables < 1.4.11.1-3 %triggerun -- iptables < 1.4.11.1-3
# To apply saved runlevel, use systemd-sysv-convert --apply iptables # To apply saved runlevel, use systemd-sysv-convert --apply iptables
@ -240,6 +229,7 @@ fi
%changelog %changelog
* Thu Jan 09 2014 Jiri Popelka <jpopelka@redhat.com> - 1.4.21-3 * Thu Jan 09 2014 Jiri Popelka <jpopelka@redhat.com> - 1.4.21-3
- no need to support the pre-systemd things - no need to support the pre-systemd things
- use systemd macros (#850166)
* Thu Jan 9 2014 Thomas Woerner <twoerner@redhat.com> 1.4.21-2 * Thu Jan 9 2014 Thomas Woerner <twoerner@redhat.com> 1.4.21-2
- fixed system hang at shutdown if root device is network based (RHBZ#1007934) - fixed system hang at shutdown if root device is network based (RHBZ#1007934)