[PATCH] tools: Only install guests init script if --with-init=script=redhat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Required to fix https://bugzilla.redhat.com/show_bug.cgi?id=789747
---
 libvirt.spec.in   | 5 ++++-
 tools/Makefile.am | 4 ++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index 511949e..b3b280b 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1380,7 +1380,9 @@ rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.uml
 mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-%{version} \
    $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-docs-%{version}
 
+%if ! %{with_systemd}
 sed -i -e "s|$RPM_BUILD_ROOT||g" $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/libvirt-guests
+%endif
 
 %clean
 rm -fr %{buildroot}
@@ -1593,8 +1595,10 @@ fi
 
 %if %{with_systemd}
 %{_unitdir}/libvirtd.service
+%{_unitdir}/libvirt-guests.service
 %else
 %{_sysconfdir}/rc.d/init.d/libvirtd
+%{_sysconfdir}/rc.d/init.d/libvirt-guests
 %endif
 %doc daemon/libvirtd.upstart
 %config(noreplace) %{_sysconfdir}/sysconfig/libvirtd
@@ -1856,7 +1860,6 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
 
 %{_datadir}/libvirt/cpu_map.xml
 
-%{_sysconfdir}/rc.d/init.d/libvirt-guests
 %if %{with_systemd}
 %{_unitdir}/libvirt-guests.service
 %endif
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 0d7822d..86e48e0 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -217,12 +217,12 @@ EXTRA_DIST += libvirt-guests.service.in
 SYSTEMD_UNIT_DIR = /lib/systemd/system
 
 if LIBVIRT_INIT_SCRIPT_SYSTEMD
-install-systemd: libvirt-guests.service install-initscript install-sysconfig
+install-systemd: libvirt-guests.service install-sysconfig
 	$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
 	$(INSTALL_DATA) libvirt-guests.service \
 	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
 
-uninstall-systemd: uninstall-initscript uninstall-sysconfig
+uninstall-systemd: uninstall-sysconfig
 	rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
 	rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||:
 
-- 
1.7.11.7

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]