From 4ec24515daa780118709e04cd78dae93f25a8428 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Fri, 16 Nov 2012 23:08:27 +0100 Subject: journal: use $(localstatedir)/lib/systemd/catalog for the catalog The path doesn't change in the standard configuration. Also, give full path to the journalctl binary in the hook, since it might be installed outside of $PATH. Also, add uninstall hook to remove the binary catalog. --- src/journal/catalog.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/journal/catalog.c') diff --git a/src/journal/catalog.c b/src/journal/catalog.c index 2812d5970b..3735ad9213 100644 --- a/src/journal/catalog.c +++ b/src/journal/catalog.c @@ -269,7 +269,6 @@ static int import_file(Hashmap *h, struct strbuf *sb, const char *path) { return 0; } -#define CATALOG_PATH "/var/lib/systemd/catalog" #define CATALOG_DATABASE CATALOG_PATH "/database" int catalog_update(void) { @@ -414,7 +413,7 @@ static int open_mmap(int *_fd, struct stat *_st, void **_p) { assert(_st); assert(_p); - fd = open("/var/lib/systemd/catalog/database", O_RDONLY|O_CLOEXEC); + fd = open(CATALOG_DATABASE, O_RDONLY|O_CLOEXEC); if (fd < 0) return -errno; -- cgit v1.2.3-54-g00ecf