Add calls to virFileActivateDirOverride so that the build dir
overrides are activated.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
daemon/libvirtd.c | 2 ++
src/locking/lock_daemon.c | 2 ++
tests/testutils.c | 2 ++
3 files changed, 6 insertions(+)
diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index e197db4..b4e9c1f 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -1156,6 +1156,8 @@ int main(int argc, char **argv) {
virUpdateSelfLastChanged(argv[0]);
+ virFileActivateDirOverride(argv[0]);
+
if (strstr(argv[0], "lt-libvirtd") ||
strstr(argv[0], "/daemon/.libs/libvirtd")) {
char *tmp = strrchr(argv[0], '/');
diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c
index 455cc88..969f901 100644
--- a/src/locking/lock_daemon.c
+++ b/src/locking/lock_daemon.c
@@ -1271,6 +1271,8 @@ int main(int argc, char **argv) {
}
}
+ virFileActivateDirOverride(argv[0]);
+
if (!(config = virLockDaemonConfigNew(privileged))) {
VIR_ERROR(_("Can't create initial configuration"));
exit(EXIT_FAILURE);
diff --git a/tests/testutils.c b/tests/testutils.c
index 9767a78..7d27582 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -678,6 +678,8 @@ int virtTestMain(int argc,
char *oomstr;
#endif
+ virFileActivateDirOverride(argv[0]);
+
if (!virFileExists(abs_srcdir))
return EXIT_AM_HARDFAIL;
--
1.9.0