summaryrefslogtreecommitdiffstats
path: root/src/import/importd.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-02-23 21:50:29 +0100
committerLennart Poettering <lennart@poettering.net>2024-03-01 22:25:42 +0100
commit1a176d5bb730791f5a6a16a768323cc6f863666c (patch)
treee248157db3be5713771c54d0b8462f21f0e83620 /src/import/importd.c
parentimportd: make keeping pristine copy of downloaded images optional (diff)
downloadsystemd-1a176d5bb730791f5a6a16a768323cc6f863666c.tar.xz
systemd-1a176d5bb730791f5a6a16a768323cc6f863666c.zip
importd: log the import callout that is going to be called
Diffstat (limited to 'src/import/importd.c')
-rw-r--r--src/import/importd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/import/importd.c b/src/import/importd.c
index a07ceb2288..5aeb0b1895 100644
--- a/src/import/importd.c
+++ b/src/import/importd.c
@@ -374,7 +374,7 @@ static int transfer_start(Transfer *t) {
"(sd-transfer)",
(int[]) { t->stdin_fd, t->stdout_fd < 0 ? pipefd[1] : t->stdout_fd, pipefd[1] },
/* except_fds= */ NULL, /* n_except_fds= */ 0,
- FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS|FORK_DEATHSIG_SIGTERM|FORK_REARRANGE_STDIO,
+ FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS|FORK_DEATHSIG_SIGTERM|FORK_REARRANGE_STDIO|FORK_REOPEN_LOG,
&t->pidref);
if (r < 0)
return r;
@@ -494,6 +494,11 @@ static int transfer_start(Transfer *t) {
assert(k < ELEMENTSOF(cmd));
+ if (DEBUG_LOGGING) {
+ _cleanup_free_ char *joined = strv_join((char**) cmd, " ");
+ log_debug("Calling: %s", strnull(joined));
+ }
+
r = invoke_callout_binary(cmd[0], (char * const *) cmd);
log_error_errno(r, "Failed to execute %s tool: %m", cmd[0]);
_exit(EXIT_FAILURE);