summaryrefslogtreecommitdiffstats
path: root/glusterfs.spec.in
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2012-10-11 16:42:33 +0200
committerAnand Avati <avati@redhat.com>2012-10-11 16:34:57 -0700
commit85866c6a9ef9b7401bb05f93fa9602f844d5a35b (patch)
tree50fad6769139c2cad925cd1ddbb1b7c9957dbe52 /glusterfs.spec.in
parentf1f3d1c62d1e066c065f250caa0fc005b66dba37 (diff)
build: do not unconditionally restart glusterd in glusterfs-geo-replication %post
When the glusterd service is disabled and/or not running, the %post scriptlet for the glusterfs-geo-replication sub-package should not start glusterd. To resolve this, an additional condition will only restart glusterd on an update ($1 -ge 1) and only when it is running (condrestart). Change-Id: I4c18954e979377cf7211c3a55d14896898836fe6 BUG: 766640 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/4063 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'glusterfs.spec.in')
-rw-r--r--glusterfs.spec.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
index bda103b0b..5735c6b27 100644
--- a/glusterfs.spec.in
+++ b/glusterfs.spec.in
@@ -299,8 +299,9 @@ fi
%if 0%{?_can_georeplicate}
%if 0%{!?_without_georeplication:1}
%post geo-replication
-#restart glusterd.
-%{_sysconfdir}/init.d/glusterd restart &> /dev/null
+if [ $1 -ge 1 ]; then
+ /sbin/service glusterd condrestart &>/dev/null || :
+fi
%endif
%if 0%{!?_without_georeplication:1}