- New global tag default_service
This commit is contained in:
parent
e71311de3a
commit
989a1ddebf
@ -12,6 +12,13 @@
|
||||
%define script_path /etc/rc.d/init.d
|
||||
%endif
|
||||
|
||||
# default service
|
||||
%if 0%{?fedora} < 17 && 0%{?rhel} < 7
|
||||
%bcond_without default_service
|
||||
%else
|
||||
%bcond_with default_service
|
||||
%endif
|
||||
|
||||
Name: iptables
|
||||
Summary: Tools for managing Linux kernel packet filtering capabilities
|
||||
Version: 1.4.12.2
|
||||
@ -127,7 +134,7 @@ rm -rf %{buildroot}
|
||||
/sbin/ldconfig
|
||||
if [ $1 -eq 1 ] ; then # Initial installation
|
||||
/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 ip6tables.service >/dev/null 2>&1 || :
|
||||
%endif
|
||||
@ -154,7 +161,7 @@ fi
|
||||
%{_bindir}/systemd-sysv-convert --save iptables >/dev/null 2>&1 ||:
|
||||
|
||||
# Autostart
|
||||
%if 0%{?fedora} < 17 && 0%{?rhel} < 7
|
||||
%if %{with default_service}
|
||||
/bin/systemctl --no-reload enable iptables.service >/dev/null 2>&1 ||:
|
||||
%endif
|
||||
|
||||
@ -167,7 +174,7 @@ fi
|
||||
%{_bindir}/systemd-sysv-convert --save ip6tables >/dev/null 2>&1 ||:
|
||||
|
||||
# Autostart
|
||||
%if 0%{?fedora} < 17 && 0%{?rhel} < 7
|
||||
%if %{with default_service}
|
||||
/bin/systemctl --no-reload enable ip6tables.service >/dev/null 2>&1 ||:
|
||||
%endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user