- New global tag default_service

This commit is contained in:
Thomas Woerner 2012-04-20 17:27:09 +02:00
parent e71311de3a
commit 989a1ddebf

View File

@ -12,6 +12,13 @@
%define script_path /etc/rc.d/init.d %define script_path /etc/rc.d/init.d
%endif %endif
# default service
%if 0%{?fedora} < 17 && 0%{?rhel} < 7
%bcond_without default_service
%else
%bcond_with default_service
%endif
Name: iptables Name: iptables
Summary: Tools for managing Linux kernel packet filtering capabilities Summary: Tools for managing Linux kernel packet filtering capabilities
Version: 1.4.12.2 Version: 1.4.12.2
@ -127,7 +134,7 @@ rm -rf %{buildroot}
/sbin/ldconfig /sbin/ldconfig
if [ $1 -eq 1 ] ; then # Initial installation if [ $1 -eq 1 ] ; then # Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || : /bin/systemctl daemon-reload >/dev/null 2>&1 || :
%if 0%{?fedora} < 17 && 0%{?rhel} < 7 %if %{with default_service}
/bin/systemctl enable iptables.service >/dev/null 2>&1 || : /bin/systemctl enable iptables.service >/dev/null 2>&1 || :
/bin/systemctl enable ip6tables.service >/dev/null 2>&1 || : /bin/systemctl enable ip6tables.service >/dev/null 2>&1 || :
%endif %endif
@ -154,7 +161,7 @@ fi
%{_bindir}/systemd-sysv-convert --save iptables >/dev/null 2>&1 ||: %{_bindir}/systemd-sysv-convert --save iptables >/dev/null 2>&1 ||:
# Autostart # Autostart
%if 0%{?fedora} < 17 && 0%{?rhel} < 7 %if %{with default_service}
/bin/systemctl --no-reload enable iptables.service >/dev/null 2>&1 ||: /bin/systemctl --no-reload enable iptables.service >/dev/null 2>&1 ||:
%endif %endif
@ -167,7 +174,7 @@ fi
%{_bindir}/systemd-sysv-convert --save ip6tables >/dev/null 2>&1 ||: %{_bindir}/systemd-sysv-convert --save ip6tables >/dev/null 2>&1 ||:
# Autostart # Autostart
%if 0%{?fedora} < 17 && 0%{?rhel} < 7 %if %{with default_service}
/bin/systemctl --no-reload enable ip6tables.service >/dev/null 2>&1 ||: /bin/systemctl --no-reload enable ip6tables.service >/dev/null 2>&1 ||:
%endif %endif