From: Marcin Bachry Date: Fri, 23 Dec 2016 23:42:13 +0000 (+0100) Subject: journalctl: add remote log dir to search path when --merge is passed (#4970) X-Git-Tag: v233~288 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=574b77efadb285c5c4c2773b0241a05fe56450ed;p=thirdparty%2Fsystemd.git journalctl: add remote log dir to search path when --merge is passed (#4970) The journalctl man page says: "-m, --merge Show entries interleaved from all available journals, including remote ones.", but current version of journalctl doesn't live up to this promise. This patch simply adds "/var/log/journal/remote" to search path if --merge flag is used. Should fix issue #3618 --- diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 56257c41d42..71967a0f333 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -1661,6 +1661,9 @@ static int add_search_paths(sd_journal *j) { NULSTR_FOREACH(p, search_paths) (void) add_root_directory(j, p, true); + if (!(j->flags & SD_JOURNAL_LOCAL_ONLY)) + (void) add_root_directory(j, "/var/log/journal/remote", true); + return 0; }