diff options
| author | David Lamparter <equinox@diac24.net> | 2021-04-19 10:33:18 +0200 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2021-06-29 17:57:04 +0200 |
| commit | 247898d5d27bc3bba83c56d139ecc78b23ae42b3 (patch) | |
| tree | 34cba409000a1e8f8df2e2386b5805896a677a66 /lib/libfrr.c | |
| parent | 32694c41bb298075c19b2cd50525bee3a336ccec (diff) | |
lib, watchfrr: remove `HAVE_SYSTEMD`, use own code
This replaces the external libsystemd dependency with... pretty much the
same amount of built-in code. But with one fewer dependency and build
switch needed.
Also check `JOURNAL_STREAM` for future logging integration.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/libfrr.c')
| -rw-r--r-- | lib/libfrr.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libfrr.c b/lib/libfrr.c index 0817182f7a..97dab74d9b 100644 --- a/lib/libfrr.c +++ b/lib/libfrr.c @@ -44,6 +44,7 @@ #include "frr_pthread.h" #include "defaults.h" #include "frrscript.h" +#include "systemd.h" DEFINE_HOOK(frr_late_init, (struct thread_master * tm), (tm)); DEFINE_HOOK(frr_config_pre, (struct thread_master * tm), (tm)); @@ -363,6 +364,11 @@ void frr_preinit(struct frr_daemon_info *daemon, int argc, char **argv) startup_fds |= UINT64_C(0x1) << (uint64_t)i; } + + /* note this doesn't do anything, it just grabs state, so doing it + * early in _preinit is perfect. + */ + systemd_init_env(); } bool frr_is_startup_fd(int fd) |
