[Kimchi-devel] [PATCH 2/2] add SysV init scripts of centos6 in Makefile and spec
ssdxiao
ssdxiao at 163.com
Wed Jul 2 08:52:47 UTC 2014
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
I have modified the spec file, so the file "kimchid.sysvinit.centos6" will be only
installed when the system is centos6.
At 2014-07-02 04:40:51, "Aline Manera" <alinefm at 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 at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/kimchi-devel/attachments/20140702/a1a3549c/attachment.html>
More information about the Kimchi-devel
mailing list