use systemd macros (#850166)
This commit is contained in:
parent
b848c2b54c
commit
52081b603c
@ -148,25 +148,14 @@ rm -rf %{buildroot}
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%post services
|
||||
if [ $1 -eq 1 ] ; then # Initial installation
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
%systemd_post iptables.service ip6tables.service
|
||||
|
||||
%preun services
|
||||
if [ $1 -eq 0 ]; then # Package removal, not upgrade
|
||||
/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
|
||||
%systemd_preun iptables.service ip6tables.service
|
||||
|
||||
%postun services
|
||||
/sbin/ldconfig
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
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
|
||||
%systemd_postun_with_restart iptables.service ip6tables.service
|
||||
|
||||
%triggerun -- iptables < 1.4.11.1-3
|
||||
# To apply saved runlevel, use systemd-sysv-convert --apply iptables
|
||||
@ -240,6 +229,7 @@ fi
|
||||
%changelog
|
||||
* Thu Jan 09 2014 Jiri Popelka <jpopelka@redhat.com> - 1.4.21-3
|
||||
- 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
|
||||
- fixed system hang at shutdown if root device is network based (RHBZ#1007934)
|
||||
|
Loading…
Reference in New Issue
Block a user