X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Futils%2Fsetup.c;h=edb0a0ab2dffc032884416f5bb70bbd4622bbec2;hb=9c3cabd740f470741e58cf240a6a36826e488b65;hp=7e8ae7aa02c7679d2f68345c204972caee2f9e56;hpb=cc6ff1d17f37d670330001a9d4dd91eef7044c9b;p=citadel.git diff --git a/citadel/utils/setup.c b/citadel/utils/setup.c index 7e8ae7aa0..edb0a0ab2 100644 --- a/citadel/utils/setup.c +++ b/citadel/utils/setup.c @@ -1,7 +1,7 @@ /* * Citadel setup utility * - * Copyright (c) 1987-2015 by the citadel.org team + * Copyright (c) 1987-2016 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. @@ -93,7 +93,6 @@ const char *EnvNames [eMaxQuestions] = { }; int setup_type = (-1); -int using_web_installer = 0; int enable_home = 1; char admin_name[SIZ]; char admin_pass[SIZ]; @@ -864,7 +863,7 @@ void edit_value(int curr) pw = getpwnam(ctdluidname); if (pw != NULL) { ctdluid = pw->pw_uid; - } + else if (atoi(ctdluidname) > 0) { ctdluid = atoi(ctdluidname); } @@ -1076,7 +1075,6 @@ int main(int argc, char *argv[]) char aaa[128]; int relh = 0; int home = 0; - int nRetries = 0; char relhome[PATH_MAX]=""; char ctdldir[PATH_MAX]=CTDLDIR; struct passwd *pw; @@ -1089,11 +1087,6 @@ int main(int argc, char *argv[]) /* set an invalid setup type */ setup_type = (-1); - /* Check to see if we're running the web installer */ - if (getenv("CITADEL_INSTALLER") != NULL) { - using_web_installer = 1; - } - /* parse command line args */ for (a = 0; a < argc; ++a) { if (!strncmp(argv[a], "-u", 2)) { @@ -1137,12 +1130,14 @@ int main(int argc, char *argv[]) /* * Connect to the running Citadel server. */ - while ((serv_sock < 0) && (nRetries < 10)) { + char *connectingmsg = _("Connecting to Citadel server"); + for (i=0; ((i<30) && (serv_sock < 0)) ; ++i) { /* wait for server to start up */ + progress(connectingmsg, i, 30); serv_sock = uds_connectsock(file_citadel_admin_socket); - nRetries ++; - if (serv_sock < 0) - sleep(1); + sleep(1); } + progress(connectingmsg, 30, 30); + if (serv_sock < 0) { display_error( "%s: %s %s\n",