[Libvirt-cim] [PATCH 07/10] libvirt-cim.spec: Use systemctl for tog-pegasus restart

Wenchao Xia xiawenc at linux.vnet.ibm.com
Fri Mar 15 08:21:46 UTC 2013


于 2013-3-15 6:55, John Ferlan 写道:
> For Fedora 17 and RHEL7 use systemd, so change the pegasus startup to use
> that and make a dependency upon it.
> ---
>   libvirt-cim.spec.in | 10 +++++++++-
>   1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/libvirt-cim.spec.in b/libvirt-cim.spec.in
> index 7652dee..0679d7f 100644
> --- a/libvirt-cim.spec.in
> +++ b/libvirt-cim.spec.in
> @@ -27,6 +27,9 @@ BuildRequires: libconfig-devel
>
>   BuildRequires: libxml2-devel
>   BuildRequires: libcmpiutil-devel
> +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
> +BuildRequires: systemd-units
> +%endif
>   BuildConflicts: sblim-cmpi-devel
>
>   %description
> @@ -85,7 +88,12 @@ rm -fr $RPM_BUILD_ROOT
>
>   %{_datadir}/%{name}/install_base_schema.sh %{_datadir}/%{name}
>
> -/etc/init.d/tog-pegasus condrestart
> +# Fedora 17 / RHEL-7 are first where we use systemd.
> +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
> +    systemctl restart tog-pegasus
> +%else
> +    /etc/init.d/tog-pegasus condrestart
> +%endif
>
>   %{_datadir}/%{name}/provider-register.sh -t pegasus \
>   	-n @CIM_VIRT_NS@ \
>

+1

-- 
Best Regards

Wenchao Xia




More information about the Libvirt-cim mailing list