[libvirt] [PATCH 2/4] examples: Try harder to uninstall nwfilter

Michal Privoznik mprivozn at redhat.com
Tue Apr 19 13:50:50 UTC 2016


We have this code in our Makefile that tries to remove
/etc/libvirt/nwfilter if directory is left empty after all our
example nwfilters were uninstalled. However, the check for that
is missing quotation marks thus rendering the test useless:

test -z allow-arp.xml allow-dhcp-server.xml .. qemu-announce-self.xml || \
  rmdir "/some/path/libvirt.git/_install/etc/libvirt/nwfilter"
/bin/sh: line 0: test: too many arguments

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
 examples/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/Makefile.am b/examples/Makefile.am
index 46465f9..e1c37f0 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -90,5 +90,5 @@ uninstall-local::
 	for f in $(FILTERS); do \
 		rm -f "$(NWFILTER_DIR)/`basename $$f`"; \
 	done
-	-test -z $(shell ls $(NWFILTER_DIR)) || rmdir $(NWFILTER_DIR)
+	-test -z "$(shell ls $(NWFILTER_DIR))" || rmdir $(NWFILTER_DIR)
 endif WITH_NWFILTER
-- 
2.7.3




More information about the libvir-list mailing list