* Initialize the calendar library at install to save time later

* Remove some spurious output from the calendar library
This commit is contained in:
alexhudson
2007-04-19 21:20:17 +00:00
parent 588b8acf7d
commit fa4e440f82
2 changed files with 14 additions and 2 deletions
+14
View File
@@ -99,7 +99,18 @@ InitialStoreConfiguration() {
char path[XPL_MAX_PATH];
int store_pid;
char *args[3];
BOOL cal_success;
// attempt to initialise cal lib. This creates cached data, and can be time
// consuming: do it now, rather than in the store (for now, at least)
XplConsolePrintf("Initializing calendar data...\n");
cal_success = BongoCalInit(XPL_DEFAULT_DBF_DIR);
if (! cal_success) {
XplConsolePrintf("ERROR: Couldn't initialise calendar library\n");
exit(1);
}
XplConsolePrintf("Initializing store...\n");
store_pid = fork();
if (store_pid == 0) { /* child */
static char *install = "--install";
@@ -146,6 +157,7 @@ InitialStoreConfiguration() {
goto nmapcleanup;
}
XplConsolePrintf("Setting default agent configuration...\n");
if (!PutOrReplaceConfig(client, "/config", "manager", bongo_manager_config)) {
XplConsolePrintf("ERROR: couldn't write /config/manager\n");
}
@@ -153,6 +165,8 @@ InitialStoreConfiguration() {
XplConsolePrintf("ERROR: couldn't write /config/avirus\n");
}
XplConsolePrintf("Complete.\n");
nmapcleanup:
NMAPQuit(client->conn);
ConnFree(client->conn);
-2
View File
@@ -988,12 +988,10 @@ BongoCalTimezoneInit(const char *cachedir)
return TRUE;
}
printf("libbongocal: Generating system timezone cache\n");
if (!CacheSystemTimezones(cachedir)) {
printf("libbongocal: Couldn't generate system timezone cache\n");
return FALSE;
}
printf("libbongocal: Done generating system timezone cache\n");
timezonesInitialized = TRUE;