Skip to contentSkip to conversation

libvirt: Check for qemu.conf before modifying

PATCH In review Jeremy Puhlman 2 participants 2 messages Jun 13, 2018 – Jun 14, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libvirt: Check for qemu.conf before modifying

---
 recipes-extended/libvirt/libvirt_4.3.0.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
recipes-extended/libvirt/libvirt_4.3.0.bb +4 -2
index ef51b9e..edd5261 100644
@@ -266,8 +266,10 @@ do_install_append() {
 	fi
 
 	# disable seccomp_sandbox
-	sed -i '/^#seccomp_sandbox = 1/aseccomp_sandbox = 0' \
-	    ${D}${sysconfdir}/libvirt/qemu.conf
+        if [ -e ${D}${sysconfdir}/libvirt/qemu.conf ] ; then
+	   sed -i '/^#seccomp_sandbox = 1/aseccomp_sandbox = 0' \
+	       ${D}${sysconfdir}/libvirt/qemu.conf
+        fi
 
 	# Add hook support for libvirt
 	mkdir -p ${D}/etc/libvirt/hooks
Signature · 1 line
2.11.1
#1 lore raw

merged

Bruce

Quoted 32 lines · Jeremy Puhlman
---
 recipes-extended/libvirt/libvirt_4.3.0.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
recipes-extended/libvirt/libvirt_4.3.0.bb +4 -3
index ef51b9e..edd5261 100644
@@ -266,8 +266,10 @@ do_install_append() {
        fi
 
        # disable seccomp_sandbox
-       sed -i '/^#seccomp_sandbox = 1/aseccomp_sandbox = 0' \
-           ${D}${sysconfdir}/libvirt/qemu.conf
+        if [ -e ${D}${sysconfdir}/libvirt/qemu.conf ] ; then
+          sed -i '/^#seccomp_sandbox = 1/aseccomp_sandbox = 0' \
+              ${D}${sysconfdir}/libvirt/qemu.conf
+        fi
 
        # Add hook support for libvirt
        mkdir -p ${D}/etc/libvirt/hooks
--

2.11.1

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"