server: add "init" event
[metze/ctdb/wip.git] / server / ctdb_daemon.c
index e96b369ece602a1e2126fff29b5cb93d442c5908..7fbbf3fffb73842a115db7b93e46c5d5fbc30d2e 100644 (file)
@@ -781,6 +781,12 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool use_syslog)
                ctdb_fatal(ctdb, "Failed to get initial freeze\n");
        }
 
+       ret = ctdb_event_script(ctdb, CTDB_EVENT_INIT);
+       if (ret != 0) {
+               ctdb_fatal(ctdb, "Failed to run init event\n");
+       }
+       ctdb_run_notification_script(ctdb, "init");
+
        /* now start accepting clients, only can do this once frozen */
        fde = event_add_fd(ctdb->ev, ctdb, ctdb->daemon.sd, 
                           EVENT_FD_READ|EVENT_FD_AUTOCLOSE,