]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
daemon: Portable auto-detection of driver module directory
authorJiri Denemark <jdenemar@redhat.com>
Thu, 2 Aug 2012 13:41:23 +0000 (15:41 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 2 Aug 2012 14:17:12 +0000 (16:17 +0200)
When running libvirtd from a build directory on a system with unmodified
libtool, libvirtd's binary is not renamed as "lt-libvirtd". Check for
"/daemon/.libs/libvirtd" in addition to "lt-libvirtd".

daemon/libvirtd.c

index ba0cc1f290faee5a129a387974349f56291aecf4..49b69ef8ce8f48827bedc3f92b68927f3a9728aa 100644 (file)
@@ -972,7 +972,8 @@ int main(int argc, char **argv) {
     virLogSetFromEnv();
 
 #ifdef WITH_DRIVER_MODULES
-    if (strstr(argv[0], "lt-libvirtd")) {
+    if (strstr(argv[0], "lt-libvirtd") ||
+        strstr(argv[0], "/daemon/.libs/libvirtd")) {
         char *tmp = strrchr(argv[0], '/');
         if (!tmp) {
             fprintf(stderr, _("%s: cannot identify driver directory\n"), argv[0]);