diff options
Diffstat (limited to 'bbot/agent.cxx')
-rw-r--r-- | bbot/agent.cxx | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/bbot/agent.cxx b/bbot/agent.cxx index 8e13720..8847e62 100644 --- a/bbot/agent.cxx +++ b/bbot/agent.cxx @@ -693,17 +693,8 @@ try verb = ops.verbose (); if (ops.systemd_daemon ()) - { systemd_diagnostics (true); // With critical errors. - info << "bbot agent " << BBOT_VERSION_STR << - info << "toolchain name " << tc_name << - info << "toolchain num " << tc_num << - info << "toolchain id " << tc_id << - info << "CPU(s) " << ops.cpu () << - info << "RAM(kB) " << ops.ram (); - } - tracer trace ("main"); uid = getuid (); @@ -771,6 +762,21 @@ try fail << "unable to set signal handler: " << system_error (errno, generic_category ()); // Sanitize. + if (ops.systemd_daemon ()) + { + diag_record dr; + + dr << info << "bbot agent " << BBOT_VERSION_STR << + info << "toolchain name " << tc_name << + info << "toolchain num " << tc_num << + info << "toolchain id " << tc_id << + info << "CPU(s) " << ops.cpu () << + info << "RAM(kB) " << ops.ram (); + + for (const string& u: controllers) + dr << info << "controller url " << u; + } + // The work loop. The steps we go through are: // // 1. Enumerate the available machines, (re-)bootstrapping any if necessary. @@ -906,7 +912,7 @@ try continue; } - const task_manifest& t (*tr.task); + task_manifest& t (*tr.task); if (ops.dump_task ()) { @@ -914,6 +920,12 @@ try return 0; } + // If we have our own repository certificate fingerprints, then use them + // to replace what we have received from the controller. + // + if (!ops.trust ().empty ()) + t.trust = ops.trust (); + const dir_path& d (ds[i]); // The -<toolchain> directory. const bootstrapped_machine_manifest& m (ms[i]); |