From 480105770b45ac8bc3b6a369959d0542fdddf94a Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 9 Sep 2004 02:26:47 +0000 Subject: [PATCH] * Completed (I think) the 'dialog' mode in setup --- citadel/ChangeLog | 4 +++- citadel/setup.c | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 60cbc3612..d4a0948bc 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,7 @@ $Log$ + Revision 625.18 2004/09/09 02:26:45 ajc + * Completed (I think) the 'dialog' mode in setup + Revision 625.17 2004/09/08 04:16:07 ajc * setup.c: initial changes to use a 'dialog' based setup (yes, it's back, because the b0rken version is now long gone and it appears to be more @@ -6066,4 +6069,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import - diff --git a/citadel/setup.c b/citadel/setup.c index b0a1e202d..da330c1d4 100644 --- a/citadel/setup.c +++ b/citadel/setup.c @@ -395,12 +395,13 @@ void progress(char *text, long int curr, long int cmax) case UI_DIALOG: if (curr == 0) { - sprintf(buf, "%s --gauge '%s' 10 72", + sprintf(buf, "%s --gauge '%s' 7 72", getenv("CTDL_DIALOG"), text); fp = popen(buf, "w"); if (fp != NULL) { fprintf(fp, "0\n"); + fflush(fp); } } else if (curr == cmax) { @@ -456,7 +457,7 @@ void check_services_entry(void) FILE *sfp; if (getservbyname(SERVICE_NAME, PROTO_NAME) == NULL) { - for (i=0; i<3; ++i) { + for (i=0; i<=3; ++i) { progress("Adding service entry...", i, 3); if (i == 0) { sfp = fopen("/etc/services", "a"); @@ -1174,15 +1175,19 @@ NEW_INST: progress("Setting file permissions", 0, 4); chown(".", config.c_bbsuid, gid); + sleep(1); progress("Setting file permissions", 1, 4); chown("citadel.config", config.c_bbsuid, gid); + sleep(1); progress("Setting file permissions", 2, 4); snprintf(aaa, sizeof aaa, "find . | grep -v chkpwd | xargs chown %ld:%ld 2>/dev/null", (long)config.c_bbsuid, (long)gid); system(aaa); + sleep(1); progress("Setting file permissions", 3, 4); chmod("citadel.config", S_IRUSR | S_IWUSR); + sleep(1); progress("Setting file permissions", 4, 4); #ifdef HAVE_LDAP -- 2.39.2