summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--glusterfs.spec.in19
2 files changed, 11 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index cb6b4616ddb..ac0c7abc8c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -825,7 +825,7 @@ AC_ARG_ENABLE([firewalld],
[BUILD_FIREWALLD="${enableval}"], [BUILD_FIREWALLD="no"])
if test "x${BUILD_FIREWALLD}" = "xyes"; then
- if !(which firewalld 1>/dev/null 2>&1) ; then
+ if !(test -d /usr/lib/firewalld/services 1>/dev/null 2>&1) ; then
BUILD_FIREWALLD="no (firewalld not installed)"
fi
fi
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
index c120599a1f3..9e4176ef89e 100644
--- a/glusterfs.spec.in
+++ b/glusterfs.spec.in
@@ -231,7 +231,7 @@ BuildRequires: libattr-devel
%endif
%if (0%{?_with_firewalld:1})
-BuildRequires: firewalld
+BuildRequires: firewalld-filesystem
%endif
Obsoletes: hekafs
@@ -554,6 +554,10 @@ Requires(preun): /sbin/service
Requires(preun): /sbin/chkconfig
Requires(postun): /sbin/service
%endif
+%if (0%{?_with_firewalld:1})
+# we install firewalld rules, so we need to have the directory owned
+Requires: firewalld-filesystem
+%endif
%if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} >= 6 )
Requires: rpcbind
%else
@@ -848,11 +852,7 @@ if [ -e /etc/ld.so.conf.d/glusterfs.conf ]; then
fi
%if (0%{?_with_firewalld:1})
-#reload service files if firewalld running
-if $(systemctl is-active firewalld 1>/dev/null 2>&1); then
- #firewalld-filesystem is not available for rhel7, so command used for reload.
- firewall-cmd --reload 1>/dev/null 2>&1
-fi
+ %firewalld_reload
%endif
pidof -c -o %PPID -x glusterd &> /dev/null
@@ -931,9 +931,7 @@ exit 0
%postun server
/sbin/ldconfig
%if (0%{?_with_firewalld:1})
-#reload service files if firewalld running
-if $(systemctl is-active firewalld 1>/dev/null 2>&1); then
- firewall-cmd --reload
+ %firewalld_reload
fi
%endif
exit 0
@@ -1270,6 +1268,9 @@ exit 0
%endif
%changelog
+* Fri Jan 6 2017 Niels de Vos <ndevos@redhat.com>
+- use macro provided by firewalld-filesystem to reload firewalld
+
* Thu Nov 24 2016 Jiffin Tony Thottan <jhottan@redhat.com>
- remove S31ganesha-reset.sh from hooks (#1397795)