diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-05-10 04:36:24 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-05-10 04:37:24 +0200 |
commit | e8357737c649ab3f1e83d02f7c7870738ee63d5b (patch) | |
tree | 72aa462c271a44b92fc2bee1541161e1487f0b1b /src/vmspawn | |
parent | vmspawn: trivial cleanups for start_systemd_journal_remote() (diff) | |
download | systemd-e8357737c649ab3f1e83d02f7c7870738ee63d5b.tar.xz systemd-e8357737c649ab3f1e83d02f7c7870738ee63d5b.zip |
vmspawn: fix finding systemd-journal-remote binary
Follow-up for 258d26940fb6bfa1b5b8acf03cc4a37f2657e4ac.
Fixes https://github.com/systemd/systemd/pull/31218#discussion_r1596168449.
Diffstat (limited to 'src/vmspawn')
-rw-r--r-- | src/vmspawn/vmspawn.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/vmspawn/vmspawn.c b/src/vmspawn/vmspawn.c index a5666459a3..4a6ef759a5 100644 --- a/src/vmspawn/vmspawn.c +++ b/src/vmspawn/vmspawn.c @@ -1923,7 +1923,15 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) { if (arg_forward_journal) { _cleanup_free_ char *sd_journal_remote = NULL, *listen_address = NULL, *cred = NULL; - r = find_executable("systemd-journal-remote", &sd_journal_remote); + + r = find_executable_full( + "systemd-journal-remote", + /* root = */ NULL, + STRV_MAKE(LIBEXECDIR), + /* use_path_envvar = */ true, /* systemd-journal-remote should be installed in + * LIBEXECDIR, but for supporting fancy setups. */ + &sd_journal_remote, + /* ret_fd = */ NULL); if (r < 0) return log_error_errno(r, "Failed to find systemd-journal-remote binary: %m"); |