-
- if (yesno(question, 1)) {
- snprintf(buf, sizeof buf, "/bin/mv -f %s %s", new_filename, NSSCONF);
- rv = system(buf);
- if (rv != 0) {
- fprintf(stderr, "failed to edit %s.\n", NSSCONF);
- }
- chmod(NSSCONF, 0644);
- }
- unlink(new_filename);
-}
-
-
-
-#if 0
- important_message(_("Setup finished"),
- _("Setup of the Citadel server is complete.\n"
- "If you will be using WebCit, please run its\n"
- "setup program now; otherwise, run './citadel'\n"
- "to log in.\n"));
- important_message(_("Setup failed"),
- _("Setup is finished, but the Citadel server failed to start.\n"
- "Go back and check your configuration.\n")
- important_message(_("Setup finished"),
- _("Setup is finished. You may now start the server."));
-#endif
-
-
-
-#define GetDefaultVALINT(CFGNAME, DEFL) GetDefaultValInt(&config.CFGNAME, "CITADEL_"#CFGNAME, DEFL)
-void GetDefaultValInt(int *WhereTo, const char *VarName, int DefVal)
-{
- const char *ch;
- if (*WhereTo == 0) *WhereTo = DefVal;
-
- if ((setup_type == UI_SILENT) &&
- (ch = getenv(VarName), ch != NULL))
- {
- *WhereTo = atoi(ch);
- }
-}
-#define GetDefaultVALCHAR(CFGNAME, DEFL) GetDefaultValChar(&config.CFGNAME, "CITADEL_"#CFGNAME, DEFL)
-void GetDefaultValChar(char *WhereTo, const char *VarName, char DefVal)
-{
- const char *ch;
- if (*WhereTo == 0) *WhereTo = DefVal;
-
- if ((setup_type == UI_SILENT) &&
- (ch = getenv(VarName), ch != NULL))
- {
- *WhereTo = atoi(ch);
- }
-}
-#define GetDefaultVALSTR(CFGNAME, DEFL) GetDefaultValStr(&config.CFGNAME[0], sizeof(config.CFGNAME), "CITADEL_"#CFGNAME, DEFL)
-void GetDefaultValStr(char *WhereTo, size_t nMax, const char *VarName, const char *DefVal)
-{
- const char *ch;
- if (*WhereTo == '\0')
- safestrncpy(WhereTo, DefVal, nMax);
-
- if ((setup_type == UI_SILENT) &&
- (ch = getenv(VarName), ch != NULL))
- {
- safestrncpy(WhereTo, ch, nMax);
- }