diff options
author | Ji-Hyeon Gim <potatogim@gluesys.com> | 2017-09-09 13:35:25 +0900 |
---|---|---|
committer | Ji-Hyeon Gim <potatogim@potatogim.net> | 2017-09-21 19:30:27 +0900 |
commit | feb517ae133fd4af0dc35725070e80522ea43539 (patch) | |
tree | 51aa21a538139b495de5cb2a0b60daa94f086654 /gluster-block.spec.in | |
parent | 95db5c36b38fa883141cb3eeb237957d18091168 (diff) |
dist: supports initd for non-systemd distros
Problem
gluster-blockd supports systemd officially but many legacy distros
want to use initd
Resolve
includes initd scripts for non-systemd distros
Change-Id: I8495e8d9abbef6d26ac7dc8dbbe6d07e7713f537
Signed-off-by: Ji-Hyeon Gim <potatogim@gluesys.com>
Diffstat (limited to 'gluster-block.spec.in')
-rw-r--r-- | gluster-block.spec.in | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/gluster-block.spec.in b/gluster-block.spec.in index e9e01e1..b14c5d5 100644 --- a/gluster-block.spec.in +++ b/gluster-block.spec.in @@ -2,8 +2,10 @@ ##----------------------------------------------------------------------------- ## All %%global definitions should be placed here and keep them sorted ## -%if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} > 6 ) +%if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} > 6 ) || ( 0%{?centos_version} && 0%{?centos_version} > 6) %global _with_systemd true +%else +%global _with_initd true %endif @@ -42,12 +44,19 @@ make %install make DESTDIR=${RPM_BUILD_ROOT} install +%if ( 0%{?_with_initd:1} ) +mv %{buildroot}/%{_initddir}/gluster-blockd.initd %{buildroot}/%{_initddir}/gluster-blockd +%endif %clean rm -rf ${RPM_BUILD_ROOT} %files +%if ( 0%{?_with_initd:1} ) +%doc COPYING-GPLV2 COPYING-LGPLV3 +%else %license COPYING-GPLV2 COPYING-LGPLV3 +%endif %doc README.md INSTALL %{_sbindir}/gluster-block %{_sbindir}/gluster-blockd @@ -55,10 +64,15 @@ rm -rf ${RPM_BUILD_ROOT} %if ( 0%{?_with_systemd:1} ) %{_unitdir}/gluster-blockd.service %{_unitdir}/gluster-block-target.service -%config(noreplace) %{_sysconfdir}/sysconfig/gluster-blockd +%else +%attr(755, root, root) %{_initddir}/gluster-blockd %endif +%config(noreplace) %{_sysconfdir}/sysconfig/gluster-blockd %changelog +* Fri Sep 15 2017 Ji-Hyeon Gim <potatogim@potatogim.net> +- update with sysconfig handling for non-systemd distros + * Fri Aug 11 2017 Prasanna Kumar Kalever <prasanna.kalever@redhat.com> - add wrapper target service unit |