Jmsg((JCR *)NULL, M_ERROR_TERM, 0, _("Please correct configuration file: %s\n"), configfile);
}
+ drop(uid, gid); /* reduce privileges if requested */
+
+ if (!check_catalog()) {
+ Jmsg((JCR *)NULL, M_ERROR_TERM, 0, _("Please correct configuration file: %s\n"), configfile);
+ }
+
if (test_config) {
terminate_dird(0);
}
create_pid_file(director->pid_directory, "bacula-dir", get_first_port_host_order(director->DIRaddrs));
read_state_file(director->working_directory, "bacula-dir", get_first_port_host_order(director->DIRaddrs));
- drop(uid, gid); /* reduce privileges if requested */
-
- if (!check_catalog()) {
- Jmsg((JCR *)NULL, M_ERROR_TERM, 0, _("Please correct configuration file: %s\n"), configfile);
- }
#if !defined(HAVE_WIN32)
signal(SIGHUP, reload_config);
catalog->db_port, catalog->db_socket,
catalog->mult_db_connections);
if (!db || !db_open_database(NULL, db)) {
+ Pmsg2(000, _("Could not open Catalog \"%s\", database \"%s\".\n"),
+ catalog->name(), catalog->db_name);
Jmsg(NULL, M_FATAL, 0, _("Could not open Catalog \"%s\", database \"%s\".\n"),
catalog->name(), catalog->db_name);
if (db) {
Jmsg(NULL, M_FATAL, 0, _("%s"), db_strerror(db));
+ Pmsg1(000, "%s", db_strerror(db));
}
OK = false;
continue;
}
db_close_database(NULL, db);
}
+ /* Set type in global for debugging */
+ set_db_type(db_get_type());
return OK;
}