From 85866c6a9ef9b7401bb05f93fa9602f844d5a35b Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Thu, 11 Oct 2012 16:42:33 +0200 Subject: 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 Reviewed-on: http://review.gluster.org/4063 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- glusterfs.spec.in | 5 +++-- 1 file 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} -- cgit