]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Add VERSION/BDATE to daemon startup/shutdown events
authorEric Bollengier <eric@baculasystems.com>
Tue, 3 Nov 2020 10:00:21 +0000 (11:00 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:02:58 +0000 (09:02 +0100)
bacula/src/dird/dird.c
bacula/src/filed/filed.c
bacula/src/stored/stored.c

index 08e06a8a22e99ea0eae2496b2478bf7eeb8d293a..dcaf25a4050df4ba0f987762a3aa64b879dba6b3 100644 (file)
@@ -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();
index 0b045779cd64b78690e0678f176169ac1e6c80a0..c950557fc8f87bb11b5b2797c398f88661f2ee24 100644 (file)
@@ -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) {
index 91c4e68d042715b7a8b1780a376e2c789231de76..a8a8df7ca4a37ac6812ae28c76ff29a23dad0ee9 100644 (file)
@@ -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);