On 07/03/2014 04:40 AM, ssdxiao wrote:
Sorry , I have misstake
I fount kimchid can start and stop in Centos6 by initctl.
so my patch is not useful unless we need add sysV init in Centos6.
Maybe somebody will ignore how to start kimchid in centos6 like me,
so could we add the startup mode in README.md.
It is always good to have it documented.
Do you want to send a patch to update the README.md for centos6?
在 2014-07-02 08:26:17,"Aline Manera" <alinefm(a)linux.vnet.ibm.com> 写道:
On 07/02/2014 05:52 AM, ssdxiao wrote:
>
> I found that SysV init scripts can't work on centos6.
> Because the kimchid.sysvinit use /etc/rc.status
> and SysV init script use /etc/init.d/functions in centos6.
> so I commit a patch to add it
>
OK.
> I have modified the spec file, so thefile
> "kimchid.sysvinit.centos6" will be only
> installed when the system is centos6.
From the below code it is not true:
>> %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
If I am running on a rhel6 or centos, those 2 scripts will be installed.
>
> At 2014-07-02 04:40:51, "Aline
Manera"<alinefm(a)linux.vnet.ibm.com> wrote:
> >
> >On 06/19/2014 07:43 AM, ssdxiao wrote:
> >> need rpm support to install the SysV init scripts
> >>
> >> Signed-off-by: Ding Xiao<ssdxiao(a)163.com>
> >> ---
> >> 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
> >
>
>