Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- Bacula® is a registered trademark of John Walker.
+ Bacula® is a registered trademark of Kern Sibbald.
The licensor of Bacula is the Free Software Foundation Europe
(FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
Switzerland, email:ftf@fsfeurope.org.
#include "bacula.h"
#include "stored.h"
-#ifdef USE_FAKETAPE
-#include "faketape.h"
+#ifdef USE_VTAPE
+#include "vtape.h"
#endif
/* Dummy functions */
int generate_daemon_event(JCR *jcr, const char *event) { return 1; }
+extern bool parse_sd_config(CONFIG *config, const char *configfile, int exit_code);
/* External subroutines */
extern void free_config_resources();
/* Static variables */
+static CONFIG *config;
#define CONFIG_FILE "bacula-sd.conf"
char *configfile = NULL;
daemon_start_time = time(NULL);
- parse_config(configfile);
-
+ config = new_config_parser();
+ parse_sd_config(config, configfile, M_ERROR_TERM);
/* See if we can open a device */
if (margc == 0) {
if (configfile) {
free(configfile);
}
- free_config_resources();
+ if (config) {
+ config->free_resources();
+ free(config);
+ config = NULL;
+ }
if (args) {
free_pool_memory(args);
args = NULL;
free_jcr(jcr);
jcr = NULL;
+ free_volume_lists();
+
if (dev) {
dev->term();
}
- free_volume_list();
-
if (debug_level > 10)
print_memory_pool_stats();
found = true;
break;
}
- if (!found) {
+ if (*cmd && !found) {
Pmsg1(0, _("\"%s\" is an invalid command\n"), cmd);
}
}