]> code.citadel.org Git - citadel.git/blobdiff - citadel/utils/setup.c
Gratuitous style cleanup
[citadel.git] / citadel / utils / setup.c
index f69f52bebfd4b7bd4434744b65b21b92c45dead2..99bba3eefe3e64a36dbb741a1733238fe43f7556 100644 (file)
@@ -1,15 +1,9 @@
 /*
- * $Id$
- *
  * Citadel setup utility
- *
  */
 
 #define SHOW_ME_VAPPEND_PRINTF
-
 #include "ctdl_module.h"
-
-
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdio.h>
@@ -115,8 +109,8 @@ void SetTitles(void)
        setup_titles[eLDAP_Bind_PW] = _("LDAP bind password:");//
 }
 
-/**
- * \brief print the actual stack frame.
+/*
+ * print the actual stack frame.
  */
 void cit_backtrace(void)
 {
@@ -125,7 +119,6 @@ void cit_backtrace(void)
        size_t size, i;
        char **strings;
 
-
        size = backtrace(stack_frames, sizeof(stack_frames) / sizeof(void*));
        strings = backtrace_symbols(stack_frames, size);
        for (i = 0; i < size; i++) {
@@ -140,8 +133,8 @@ void cit_backtrace(void)
 
 struct config config;
 
-       /* calculate all our path on a central place */
-    /* where to keep our config */
+/* calculate all our path on a central place */
+/* where to keep our config */
        
 
 char *setup_text[] = {
@@ -173,9 +166,11 @@ char *setup_text[] = {
 "user ID here.  You may specify either a user name or a numeric\n"
 "UID.\n",
 
-"Specify the IP address on which your server will run.  If you\n"
-"leave this blank, or if you specify 0.0.0.0, Citadel will listen\n"
-"on all addresses.  You can usually skip this unless you are\n"
+"Specify the IP address on which your server will run.\n"
+"You can name a specific IPv4 or IPv6 address, or you can specify\n"
+"'*' for 'any address', '::' for 'any IPv6 address', or '0.0.0.0'\n"
+"for 'any IPv4 address'.  If you leave this blank, Citadel will\n"
+"listen on all addresses.  You can usually skip this unless you are\n"
 "running multiple instances of Citadel on the same computer.\n",
 
 "Specify the TCP port number on which your server will run.\n"
@@ -185,8 +180,6 @@ char *setup_text[] = {
 "of Citadel on the same computer and there is something else\n"
 "already using port 504.\n",
 
-
-
 "Specify which authentication mode you wish to use.\n"
 "\n"
 " 0. Self contained authentication\n"
@@ -334,8 +327,7 @@ void progress(char *text, long int curr, long int cmax)
        case UI_TEXT:
                if (curr == 0) {
                        printf("%s\n", text);
-                       printf("..........................");
-                       printf("..........................");
+                       printf("....................................................");
                        printf("..........................\r");
                        fflush(stdout);
                        dots_printed = 0;
@@ -419,7 +411,6 @@ void check_services_entry(void)
 
 /*
  * delete_inittab_entry()  -- Remove obsolete /etc/inittab entry for Citadel
- *
  */
 void delete_inittab_entry(void)
 {
@@ -489,7 +480,6 @@ void delete_inittab_entry(void)
 
 /*
  * install_init_scripts()  -- Try to configure to start Citadel at boot
- *
  */
 void install_init_scripts(void)
 {
@@ -596,9 +586,6 @@ void install_init_scripts(void)
 
 
 
-
-
-
 /*
  * On systems which use xinetd, see if we can offer to install Citadel as
  * the default telnet target.
@@ -1436,8 +1423,7 @@ int main(int argc, char *argv[])
                }
        }
 
-/***** begin version update section ***** */
-       /* take care of any updating that is necessary */
+       /***** begin version update section *****/
 
        old_setup_level = config.c_setup_level;
 
@@ -1446,21 +1432,21 @@ int main(int argc, char *argv[])
        }
 
        if (old_setup_level < 555) {
-               important_message("Citadel Setup",
-                                 "This Citadel installation is too old "
-                                 "to be upgraded.");
+               important_message(
+                       "Citadel Setup",
+                       "This Citadel installation is too old to be upgraded."
+               );
                cleanup(1);
        }
        write_config_to_disk();
 
        old_setup_level = config.c_setup_level;
 
-       /* end of version update section */
+       /***** end of version update section *****/
 
 NEW_INST:
        config.c_setup_level = REV_LEVEL;
 
-/******************************************/
        if ((pw = getpwuid(config.c_ctdluid)) == NULL) {
                gid = getgid();
        } else {
@@ -1473,16 +1459,19 @@ NEW_INST:
 
         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))
+       if (    ((setup_type == UI_SILENT)
+               && (getenv("ALTER_ETC_SERVICES")!=NULL))
+               || (setup_type != UI_SILENT)
+       ) {
                check_services_entry(); /* Check /etc/services */
+       }
+
 #ifndef __CYGWIN__
        delete_inittab_entry(); /* Remove obsolete /etc/inittab entry */
        check_xinetd_entry();   /* Check /etc/xinetd.d/telnet */
        disable_other_mtas();   /* Offer to disable other MTAs */
-
+       fixnss();               /* Check for the 'db' nss and offer to disable it */
 #endif
-       fixnss();       /* Check for the 'db' nss and offer to disable it */
 
        progress("Setting file permissions", 1, 3);
        rv = chown(file_citadel_config, config.c_ctdluid, gid);
@@ -1490,7 +1479,7 @@ NEW_INST:
        rv = chmod(file_citadel_config, S_IRUSR | S_IWUSR);
        progress("Setting file permissions", 3, 3);
 
-       check_init_script (relhome);
+       check_init_script(relhome);
        cleanup(0);
        return 0;
 }