<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&nbsp;<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&nbsp;kimchid.sysvinit use&nbsp;/etc/rc.status</div>
        <div>and&nbsp;<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">&gt;&gt;   %if 0%{?rhel} == 6
&gt;&gt;   # Install the upstart script
&gt;&gt;   install -Dm 0755 contrib/kimchid-upstart.conf.fedora %{buildroot}/etc/init/kimchid.conf
&gt;&gt; +install -Dm 0755 contrib/kimchid.sysvinit.centos6 %{buildroot}%{_initrddir}/kimchid
&gt;&gt;   %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">&lt;alinefm@linux.vnet.ibm.com&gt;</a> wrote:
&gt;
&gt;On 06/19/2014 07:43 AM, ssdxiao wrote:
&gt;&gt; need rpm support to install the SysV init scripts
&gt;&gt;
&gt;&gt; Signed-off-by: Ding Xiao <a class="moz-txt-link-rfc2396E" href="mailto:ssdxiao@163.com">&lt;ssdxiao@163.com&gt;</a>
&gt;&gt; ---
&gt;&gt;   contrib/Makefile.am           |    1 +
&gt;&gt;   contrib/kimchi.spec.fedora.in |    2 ++
&gt;&gt;   2 files changed, 3 insertions(+), 0 deletions(-)
&gt;&gt;
&gt;&gt; diff --git a/contrib/Makefile.am b/contrib/Makefile.am
&gt;&gt; index e36d4cd..8f205ba 100644
&gt;&gt; --- a/contrib/Makefile.am
&gt;&gt; +++ b/contrib/Makefile.am
&gt;&gt; @@ -18,6 +18,7 @@ SUBDIRS = DEBIAN
&gt;&gt;
&gt;&gt;   EXTRA_DIST = \
&gt;&gt;           kimchid.sysvinit \
&gt;&gt; +        kimchid.sysvinit.centos6 \
&gt;&gt;           kimchid.service.fedora \
&gt;&gt;           kimchi.spec.fedora.in \
&gt;&gt;           kimchid-upstart.conf.debian \
&gt;&gt; diff --git a/contrib/kimchi.spec.fedora.in b/contrib/kimchi.spec.fedora.in
&gt;&gt; index 7a7d5e0..c583d30 100644
&gt;&gt; --- a/contrib/kimchi.spec.fedora.in
&gt;&gt; +++ b/contrib/kimchi.spec.fedora.in
&gt;&gt; @@ -77,6 +77,7 @@ install -Dm 0640 src/firewalld.xml %{buildroot}%{_prefix}/lib/firewalld/services
&gt;
&gt;&gt;   %if 0%{?rhel} == 6
&gt;&gt;   # Install the upstart script
&gt;&gt;   install -Dm 0755 contrib/kimchid-upstart.conf.fedora %{buildroot}/etc/init/kimchid.conf
&gt;&gt; +install -Dm 0755 contrib/kimchid.sysvinit.centos6 %{buildroot}%{_initrddir}/kimchid
&gt;&gt;   %endif
&gt;
&gt;So 2 startup scripts will be installed in the system when it is rhel 6?
&gt;
&gt;Instead of doing that, we should be able to recognize when system uses 
&gt;upstart or not
&gt;And based on that install the right startup script
&gt;
&gt;&gt;   %if 0%{?rhel} == 5
&gt;&gt;   # Install the SysV init scripts
&gt;&gt; @@ -196,6 +197,7 @@ rm -rf $RPM_BUILD_ROOT
&gt;&gt;   %endif
&gt;&gt;   %if 0%{?rhel} == 6
&gt;&gt;   /etc/init/kimchid.conf
&gt;&gt; +%{_initrddir}/kimchid
&gt;&gt;   %endif
&gt;&gt;   %if 0%{?rhel} == 5
&gt;&gt;   %{_initrddir}/kimchid
&gt;
</pre>
      </div>
      <br>
      <br>
      <span title="neteasefooter"><span id="netease_mail_footer"></span></span>
    </blockquote>
    <br>
  </body>
</html>