From c198d91667533dc40c35941a98a09d7515451125 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Fri, 22 Jul 2011 09:38:46 +0100 Subject: [PATCH] Pre-create /var/lib/libvirt/sanlock directory The sanlock plugin for libvirt expects the directory /var/lib/libvirt/sanlock to exist. Create this and add it to the RPM * libvirt.spec.in: Add /var/lib/libvirt/sanlock * src/Makefile.am: Create /var/lib/libvirt/sanlock --- libvirt.spec.in | 1 + src/Makefile.am | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/libvirt.spec.in b/libvirt.spec.in index 6cbd9ac613..7c8b2ec635 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1046,6 +1046,7 @@ fi %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/sanlock.so %{_datadir}/augeas/lenses/libvirt_sanlock.aug %{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug +%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/sanlock %{_sbindir}/virt-sanlock-cleanup %{_mandir}/man8/virt-sanlock-cleanup.8* %endif diff --git a/src/Makefile.am b/src/Makefile.am index eef06696ff..46b92a8257 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1396,6 +1396,9 @@ install-data-local: $(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/libvirt" $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/images" $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/boot" +if HAVE_SANLOCK + $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/sanlock" +endif if WITH_QEMU $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/qemu" $(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/qemu" @@ -1438,6 +1441,9 @@ uninstall-local:: rmdir "$(DESTDIR)$(localstatedir)/cache/libvirt" ||: rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/images" ||: rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/boot" ||: +if HAVE_SANLOCK + rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/sanlock" ||: +endif if WITH_QEMU rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/qemu" ||: rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/qemu" ||: