X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Futils%2Fsetup.c;h=bf6ea963429b907ca9665d7b955a48d254ddadd8;hb=0f7b8c91ca57eba48ff548bcbefcaacf9038384b;hp=d046f209068159194257b5fcbe42ede83d26a15b;hpb=72e672807302f35ffd0d6b5fb4f7909677c9c6a5;p=citadel.git diff --git a/citadel/utils/setup.c b/citadel/utils/setup.c index d046f2090..bf6ea9634 100644 --- a/citadel/utils/setup.c +++ b/citadel/utils/setup.c @@ -1,5 +1,15 @@ /* * Citadel setup utility + * + * Copyright (c) 1987-2012 by the citadel.org team + * + * This program is open source software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #define SHOW_ME_VAPPEND_PRINTF @@ -109,11 +119,13 @@ void SetTitles(void) have_run_dir = 0; #endif +#ifdef ENABLE_NLS setlocale(LC_MESSAGES, getenv("LANG")); bindtextdomain("citadel-setup", LOCALEDIR"/locale"); textdomain("citadel-setup"); bind_textdomain_codeset("citadel-setup","UTF8"); +#endif setup_titles[eCitadelHomeDir] = _("Citadel Home Directory"); if (have_run_dir) @@ -917,7 +929,8 @@ void strprompt(const char *prompt_title, const char *prompt_text, char *Target, } break; case UI_SILENT: - strcpy(Target, DefValue); + if (*DefValue != '\0') + strcpy(Target, DefValue); break; } } @@ -1128,17 +1141,6 @@ int discover_ui(void) -void migrate_old_installs(void) -{ - int rv; - rv = system("exec /bin/rm -fr ./rooms ./chatpipes ./expressmsgs ./sessions 2>/dev/null"); - if (rv != 0) - fprintf(stderr, _("failed to remove old style directories.\n")); - unlink("citadel.log"); - unlink("weekly"); -} - - /* * Strip "db" entries out of /etc/nsswitch.conf */ @@ -1608,8 +1610,6 @@ NEW_INST: write_config_to_disk(); - migrate_old_installs(); /* Delete files and directories used by older Citadel versions */ - if ( ((setup_type == UI_SILENT) && (getenv("ALTER_ETC_SERVICES")!=NULL)) || (setup_type != UI_SILENT)