233933
From 850d5418fb48417d94ab17e565b2184ba951ccbe Mon Sep 17 00:00:00 2001
233933
From: Mohit Agrawal <moagrawa@redhat.com>
233933
Date: Wed, 17 Apr 2019 18:04:44 +0530
233933
Subject: [PATCH 113/124] spec: Glusterd did not start by default after node
233933
 reboot
233933
233933
Problem: After install gluster rpms glusterd service is not enabled
233933
         so systemctl status is showing "disabled"
233933
233933
Solution: Update glusterfs.spec.in to enable glusterd after install
233933
          gluster rpms
233933
233933
label: DOWNSTREAM ONLY
233933
BUG: 1699835
233933
233933
Change-Id: Ied9be5dfb1bf3bda24868722b1fbd77cb1c1d18c
233933
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
233933
Reviewed-on: https://code.engineering.redhat.com/gerrit/168168
233933
Reviewed-by: Kaleb Keithley <kkeithle@redhat.com>
233933
Tested-by: RHGS Build Bot <nigelb@redhat.com>
233933
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
233933
---
233933
 glusterfs.spec.in | 10 ++++++----
233933
 1 file changed, 6 insertions(+), 4 deletions(-)
233933
233933
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
233933
index cb17eaa..ba095b7 100644
233933
--- a/glusterfs.spec.in
233933
+++ b/glusterfs.spec.in
233933
@@ -168,6 +168,8 @@
233933
 %endif
233933
 
233933
 %if ( 0%{?_with_systemd:1} )
233933
+%global service_enable()   /bin/systemctl --quiet enable %1.service || : \
233933
+%{nil}
233933
 %global service_start()   /bin/systemctl --quiet start %1.service || : \
233933
 %{nil}
233933
 %global service_stop()    /bin/systemctl --quiet stop %1.service || :\
233933
@@ -181,7 +183,7 @@
233933
 %global glustereventsd_svcfile %{_unitdir}/glustereventsd.service
233933
 %global glusterfssharedstorage_svcfile %{_unitdir}/glusterfssharedstorage.service
233933
 %else
233933
-%global systemd_post()  /sbin/chkconfig --add %1 >/dev/null 2>&1 || : \
233933
+%global service_enable()  /sbin/chkconfig --add %1 >/dev/null 2>&1 || : \
233933
 %{nil}
233933
 %global systemd_preun() /sbin/chkconfig --del %1 >/dev/null 2>&1 || : \
233933
 %{nil}
233933
@@ -926,7 +928,7 @@ exit 0
233933
 
233933
 %if ( 0%{!?_without_events:1} )
233933
 %post events
233933
-%systemd_post glustereventsd
233933
+%service_enable glustereventsd
233933
 %endif
233933
 
233933
 %if ( 0%{!?_without_server:1} )
233933
@@ -951,9 +953,9 @@ exit 0
233933
 %if ( 0%{!?_without_server:1} )
233933
 %post server
233933
 # Legacy server
233933
-%systemd_post glusterd
233933
+%service_enable glusterd
233933
 %if ( 0%{_for_fedora_koji_builds} )
233933
-%systemd_post glusterfsd
233933
+%service_enable glusterfsd
233933
 %endif
233933
 # ".cmd_log_history" is renamed to "cmd_history.log" in GlusterFS-3.7 .
233933
 # While upgrading glusterfs-server package form GlusterFS version <= 3.6 to
233933
-- 
233933
1.8.3.1
233933