From: Eric Bollengier Date: Tue, 3 Nov 2020 10:00:21 +0000 (+0100) Subject: Add VERSION/BDATE to daemon startup/shutdown events X-Git-Tag: Release-11.3.2~876 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5bbe5801b9af0459c36a8c88e7365e20ee80375;p=thirdparty%2Fbacula.git Add VERSION/BDATE to daemon startup/shutdown events --- diff --git a/bacula/src/dird/dird.c b/bacula/src/dird/dird.c index 08e06a8a2..dcaf25a40 100644 --- a/bacula/src/dird/dird.c +++ b/bacula/src/dird/dird.c @@ -475,7 +475,8 @@ int main (int argc, char *argv[]) "DD0001", EVENTS_TYPE_DAEMON, "*Director*", - (intptr_t)get_first_port_host_order(director->DIRaddrs), "Director startup"); + (intptr_t)get_first_port_host_order(director->DIRaddrs), "Director startup %s (%s)", + VERSION, BDATE); // init_device_resources(); @@ -821,7 +822,8 @@ void terminate_dird(int sig) if (!test_config) { events_send_msg(NULL, "DD0002", EVENTS_TYPE_DAEMON, "*Director*", - (intptr_t)get_first_port_host_order(director->DIRaddrs), "Director shutdown"); + (intptr_t)get_first_port_host_order(director->DIRaddrs), "Director shutdown %s (%s)", + VERSION, BDATE); } stop_watchdog(); terminate_collector_threads(); diff --git a/bacula/src/filed/filed.c b/bacula/src/filed/filed.c index 0b045779c..c950557fc 100644 --- a/bacula/src/filed/filed.c +++ b/bacula/src/filed/filed.c @@ -282,7 +282,7 @@ int main (int argc, char *argv[]) /* Keep track of the important events */ events_send_msg(NULL, "FD0001", EVENTS_TYPE_DAEMON, "*Daemon*", - (intptr_t)get_first_port_host_order(me->FDaddrs), "Filed startup"); + (intptr_t)get_first_port_host_order(me->FDaddrs), "Filed startup %s (%s)", VERSION, BDATE); /* Load the GPFS library if installed */ GPFSLIB::Init(); @@ -331,7 +331,8 @@ void terminate_filed(int sig) } /* Keep track of the important events */ events_send_msg(NULL, "FD0002", EVENTS_TYPE_DAEMON, - "*Daemon*", (intptr_t)get_first_port_host_order(me->FDaddrs), "Filed shutdown"); + "*Daemon*", (intptr_t)get_first_port_host_order(me->FDaddrs), "Filed shutdown %s (%s)", + VERSION, BDATE); } if (configfile != NULL) { diff --git a/bacula/src/stored/stored.c b/bacula/src/stored/stored.c index 91c4e68d0..a8a8df7ca 100644 --- a/bacula/src/stored/stored.c +++ b/bacula/src/stored/stored.c @@ -331,7 +331,7 @@ int main (int argc, char *argv[]) /* Keep track of important events */ events_send_msg(NULL, "SD0001", EVENTS_TYPE_DAEMON, "*Daemon*", (intptr_t)get_first_port_host_order(me->sdaddrs), - "Storage startup"); + "Storage startup %s (%s)", VERSION, BDATE); /* Single server used for Director and File daemon */ server_tid = pthread_self(); @@ -873,7 +873,7 @@ void terminate_stored(int sig) /* Keep track of important events */ events_send_msg(NULL, "SD0003", EVENTS_TYPE_DAEMON, "*Daemon*", get_first_port_host_order(me->sdaddrs), - "Storage shutdown"); + "Storage shutdown %s (%s)", VERSION, BDATE); } Dmsg1(200, "In terminate_stored() sig=%d\n", sig);