From 66a55a4d48bd82edea024aa45bc9f7fec6a915be Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Fri, 23 Feb 2007 15:53:56 +0000 Subject: [PATCH] Added init script to RPM. Fixup paths to init script & libvirt_qemud --- ChangeLog | 7 +++++++ libvirt.spec.in | 12 +++++++++++- qemud/Makefile.am | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index acecab7518..314c155ec3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Fri Feb 23 10:52:23 EST 2007 Daniel P. Berrange + + * qemud/Makefile.am: Fix up name of init script in EXTRA_DIST + target. + * libvirt.spec.in: Update path to libvirt_qemud and add the + init script & post/pre scripts to register with chkconfig + Fri Feb 23 14:32:54 IST 2007 Mark McLoughlin * qemud/conf.c: don't load config files unless they have diff --git a/libvirt.spec.in b/libvirt.spec.in index 62d31d9d97..c2530ce358 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -74,6 +74,13 @@ rm -fr %{buildroot} %post /sbin/ldconfig +/sbin/chkconfig --add libvirtd + +%preun +if [ $1 = 0 ]; then + /sbin/service libvirtd stop 1>/dev/null 2>&1 + /sbin/chkconfig --del libvirtd +fi %postun /sbin/ldconfig @@ -85,10 +92,13 @@ rm -fr %{buildroot} %doc %{_mandir}/man1/virsh.1* %{_bindir}/virsh %{_libdir}/lib*.so.* +%config %{_sysconfdir}/libvirt/ +%config %{_sysconfdir}/libvirt/qemu/ %config %{_sysconfdir}/libvirt/qemu/networks/ +%{_sysconfdir}/rc.d/init.d/libvirtd %{_localstatedir}/run/libvirt/ %attr(4755, root, root) %{_libexecdir}/libvirt_proxy -%attr(0755, root, root) %{_libexecdir}/libvirt_qemud +%attr(0755, root, root) %{_sbindir}/libvirt_qemud %doc docs/libvirt.rng %files devel diff --git a/qemud/Makefile.am b/qemud/Makefile.am index 34b2cfc18a..1a273363c0 100644 --- a/qemud/Makefile.am +++ b/qemud/Makefile.am @@ -19,7 +19,7 @@ libvirt_qemud_LDFLAGS = $(LIBXML_LIBS) $(SYSFS_LIBS) libvirt_qemud_DEPENDENCIES = libvirt_qemud_LDADD = -EXTRA_DIST = libvirt_qemud.init.in +EXTRA_DIST = libvirtd.in if LIBVIRT_INIT_SCRIPTS_RED_HAT initdir = $(sysconfdir)/rc.d/init.d