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>
This commit is contained in:
parent
f1f3d1c62d
commit
85866c6a9e
@ -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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user