<html>
<head>
<meta content="text/html; charset=gbk" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 07/02/2014 05:52 AM, ssdxiao wrote:<br>
</div>
<blockquote
cite="mid:6bb715d1.1e5ed.146f646b43b.Coremail.ssdxiao@163.com"
type="cite">
<div
style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial">
<div><br>
</div>
<div>I found that <span style="font-family: arial; white-space:
pre-wrap; line-height: 1.7;">SysV init scripts can't work on
centos6.</span></div>
<div>Because the kimchid.sysvinit use /etc/rc.status</div>
<div>and <span style="font-family: arial; white-space: pre-wrap;
line-height: 1.7;">SysV init script use </span><font
face="arial"><span style="white-space: pre-wrap;">/etc/init.d/functions
in centos6.</span></font></div>
<div><font face="arial"><span style="white-space: pre-wrap;">so
I commit a patch to add it</span></font></div>
<div><span style="font-family: arial; white-space: pre-wrap;
line-height: 1.7;"><br>
</span></div>
</div>
</blockquote>
<br>
OK.<br>
<br>
<blockquote
cite="mid:6bb715d1.1e5ed.146f646b43b.Coremail.ssdxiao@163.com"
type="cite">
<div
style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial">
<div><span style="font-family: arial; white-space: pre-wrap;
line-height: 1.7;">I have modified the spec file, so the</span><span
style="font-family: arial; line-height: 1.7; white-space:
pre-wrap;"> file "kimchid.sysvinit.centos6" will be only</span></div>
<div><span style="font-family: arial; line-height: 1.7;
white-space: pre-wrap;">installed when the system is
centos6.</span></div>
</div>
</blockquote>
<br>
From the below code it is not true:<br>
<br>
<pre><font face="sans-serif">>> %if 0%{?rhel} == 6
>> # Install the upstart script
>> install -Dm 0755 contrib/kimchid-upstart.conf.fedora %{buildroot}/etc/init/kimchid.conf
>> +install -Dm 0755 contrib/kimchid.sysvinit.centos6 %{buildroot}%{_initrddir}/kimchid
>> %endif</font></pre>
<br>
If I am running on a rhel6 or centos, those 2 scripts will be
installed.<br>
<br>
<blockquote
cite="mid:6bb715d1.1e5ed.146f646b43b.Coremail.ssdxiao@163.com"
type="cite">
<div
style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial">
<div><span style="font-family: arial; white-space: pre-wrap;
line-height: 1.7;"><br>
</span></div>
<pre>At 2014-07-02 04:40:51, "Aline Manera" <a class="moz-txt-link-rfc2396E" href="mailto:alinefm@linux.vnet.ibm.com"><alinefm@linux.vnet.ibm.com></a> wrote:
>
>On 06/19/2014 07:43 AM, ssdxiao wrote:
>> need rpm support to install the SysV init scripts
>>
>> Signed-off-by: Ding Xiao <a class="moz-txt-link-rfc2396E" href="mailto:ssdxiao@163.com"><ssdxiao@163.com></a>
>> ---
>> contrib/Makefile.am | 1 +
>> contrib/kimchi.spec.fedora.in | 2 ++
>> 2 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/contrib/Makefile.am b/contrib/Makefile.am
>> index e36d4cd..8f205ba 100644
>> --- a/contrib/Makefile.am
>> +++ b/contrib/Makefile.am
>> @@ -18,6 +18,7 @@ SUBDIRS = DEBIAN
>>
>> EXTRA_DIST = \
>>         kimchid.sysvinit \
>> +        kimchid.sysvinit.centos6 \
>>         kimchid.service.fedora \
>>         kimchi.spec.fedora.in \
>>         kimchid-upstart.conf.debian \
>> diff --git a/contrib/kimchi.spec.fedora.in b/contrib/kimchi.spec.fedora.in
>> index 7a7d5e0..c583d30 100644
>> --- a/contrib/kimchi.spec.fedora.in
>> +++ b/contrib/kimchi.spec.fedora.in
>> @@ -77,6 +77,7 @@ install -Dm 0640 src/firewalld.xml %{buildroot}%{_prefix}/lib/firewalld/services
>
>> %if 0%{?rhel} == 6
>> # Install the upstart script
>> install -Dm 0755 contrib/kimchid-upstart.conf.fedora %{buildroot}/etc/init/kimchid.conf
>> +install -Dm 0755 contrib/kimchid.sysvinit.centos6 %{buildroot}%{_initrddir}/kimchid
>> %endif
>
>So 2 startup scripts will be installed in the system when it is rhel 6?
>
>Instead of doing that, we should be able to recognize when system uses
>upstart or not
>And based on that install the right startup script
>
>> %if 0%{?rhel} == 5
>> # Install the SysV init scripts
>> @@ -196,6 +197,7 @@ rm -rf $RPM_BUILD_ROOT
>> %endif
>> %if 0%{?rhel} == 6
>> /etc/init/kimchid.conf
>> +%{_initrddir}/kimchid
>> %endif
>> %if 0%{?rhel} == 5
>> %{_initrddir}/kimchid
>
</pre>
</div>
<br>
<br>
<span title="neteasefooter"><span id="netease_mail_footer"></span></span>
</blockquote>
<br>
</body>
</html>