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 /watchfrr | |
parent | Merge pull request #8909 from idryzhov/isis-conf (diff) | |
download | frr-247898d5d27bc3bba83c56d139ecc78b23ae42b3.tar.xz frr-247898d5d27bc3bba83c56d139ecc78b23ae42b3.zip |
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 'watchfrr')
-rw-r--r-- | watchfrr/watchfrr.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/watchfrr/watchfrr.c b/watchfrr/watchfrr.c index faf1777d7..d0b4be81d 100644 --- a/watchfrr/watchfrr.c +++ b/watchfrr/watchfrr.c @@ -469,12 +469,10 @@ static int run_job(struct restart_info *restart, const char *cmdtype, return -1; } -#if defined HAVE_SYSTEMD char buffer[512]; snprintf(buffer, sizeof(buffer), "restarting %s", restart->name); systemd_send_status(buffer); -#endif /* Note: time_elapsed test must come before the force test, since we need @@ -506,9 +504,8 @@ static int run_job(struct restart_info *restart, const char *cmdtype, restart->pid = 0; } -#if defined HAVE_SYSTEMD systemd_send_status("FRR Operational"); -#endif + /* Calculate the new restart interval. */ if (update_interval) { if (delay.tv_sec > 2 * gs.max_restart_interval) @@ -718,10 +715,9 @@ static void daemon_send_ready(int exitcode) fp = fopen(started, "w"); if (fp) fclose(fp); -#if defined HAVE_SYSTEMD - systemd_send_started(master, 0); + + systemd_send_started(master); systemd_send_status("FRR Operational"); -#endif sent = 1; } |