gplv2/haproxy/centos/meta_patches/haproxy-spec-add-init-scrip...

48 lines
1.6 KiB
Diff

From 959767df3285a81f1c5650018ed846fe90a68c9d Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 16:12:36 -0400
Subject: [PATCH 2/7] WRS: haproxy-spec-add-init-script.patch
---
SPECS/haproxy.spec | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/SPECS/haproxy.spec b/SPECS/haproxy.spec
index 42ddeb0..cbd9161 100644
--- a/SPECS/haproxy.spec
+++ b/SPECS/haproxy.spec
@@ -21,6 +21,7 @@ Source2: %{name}.cfg
Source3: %{name}.logrotate
Source4: %{name}.sysconfig
Source5: halog.1
+Source10: %{name}.sh
# WRS
Source6: 503.http
@@ -81,11 +82,14 @@ popd
%{__make} install-bin DESTDIR=%{buildroot} PREFIX=%{_prefix} TARGET="linux2628"
%{__make} install-man DESTDIR=%{buildroot} PREFIX=%{_prefix}
+mkdir -p /etc/init.d
+
%{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
%{__install} -p -D -m 0640 %{SOURCE2} %{buildroot}%{haproxy_confdir}/%{name}.cfg
%{__install} -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
%{__install} -p -D -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
%{__install} -p -D -m 0644 %{SOURCE5} %{buildroot}%{_mandir}/man1/halog.1
+%{__install} -p -D -m 0755 %{SOURCE10} %{buildroot}/etc/init.d/%{name}
%{__install} -d -m 0755 %{buildroot}%{haproxy_home}
%{__install} -d -m 0755 %{buildroot}%{haproxy_datadir}
%{__install} -d -m 0755 %{buildroot}%{_bindir}
@@ -149,6 +153,7 @@ fi
%{_bindir}/halog
%{_bindir}/iprange
%{_mandir}/man1/*
+/etc/init.d/%{name}
%attr(-,%{haproxy_user},%{haproxy_group}) %dir %{haproxy_home}
# WRS
--
1.9.1