commit 47c7bfd1633c5f984e2e355d824b0d60023fcebd Author: Radu Caragea Date: Wed May 30 15:05:37 2012 +0300 Fix rundir and kernel modules Rundir wasn't set properly and in turn cachedir became "" which crashed virt-sandbox. When /lib/modules/`uname -r`/ has symlinks to the compiled sources (through /build and /source) it crashed virt-sandbox with the error: "Unable to start sandbox: Error opening file '/tmp/libvirt-sandbox-9ivpRN/9pnet.ko': File exists" The problem is that it finds multiple files for a given module. Changed back to /kernel so it only finds one of each module. diff --git a/libvirt-sandbox/Makefile.am b/libvirt-sandbox/Makefile.am index 02d5138..9aea9a6 100644 --- a/libvirt-sandbox/Makefile.am +++ b/libvirt-sandbox/Makefile.am @@ -4,7 +4,7 @@ CLEANFILES = SUBDIRS = tests -RUNDIR = $(localstatedir)/run +rundir = $(localstatedir)/run libexec_PROGRAMS = \ libvirt-sandbox-init-common \ diff --git a/libvirt-sandbox/libvirt-sandbox-builder-initrd.c b/libvirt-sandbox/libvirt-sandbox-builder-initrd.c index d3ed3a1..dd01c7a 100644 --- a/libvirt-sandbox/libvirt-sandbox-builder-initrd.c +++ b/libvirt-sandbox/libvirt-sandbox-builder-initrd.c @@ -331,7 +331,7 @@ static GList *gvir_sandbox_builder_initrd_find_modules(GList *modnames, GVirSandboxConfigInitrd *config, GError **error) { - gchar *moddirpath = g_strdup_printf("/lib/modules/%s", + gchar *moddirpath = g_strdup_printf("/lib/modules/%s/kernel", gvir_sandbox_config_initrd_get_kver(config)); GFile *moddir = g_file_new_for_path(moddirpath);