installer: Tone down the comments around the installer's rc.conf settings.
authorSascha Wildner <saw@online.de>
Tue, 16 Aug 2011 15:57:32 +0000 (17:57 +0200)
committerSascha Wildner <saw@online.de>
Tue, 16 Aug 2011 15:58:00 +0000 (17:58 +0200)
dumpdev is the only thing that is written by default and it tended to
get lost among the rather verbose comments.

usr.sbin/installer/libinstaller/confed.c

index 6043ea4..cf6f07e 100644 (file)
@@ -119,14 +119,12 @@ config_var_set(struct config_vars *cvs, const char *name, const char *value)
  * Write a set of configuration variable settings to a file.
  */
 int
-config_vars_write(const struct config_vars *cvs, int config_type, const char *fmt, ...)
+config_vars_write(const struct config_vars *cvs, int config_type,
+    const char *fmt, ...)
 {
        FILE *f;
        va_list args;
        char *filename;
-       char tstr[256];
-       int conf_written = 0;
-       time_t t;
        void *rk, *rv;
        size_t rk_len, rv_len;
 
@@ -137,35 +135,17 @@ config_vars_write(const struct config_vars *cvs, int config_type, const char *fm
        if ((f = fopen(filename, "a")) == NULL)
                return(0);
 
-       time(&t);
-       strlcpy(tstr, ctime(&t), 256);
-       if (strlen(tstr) > 0)
-               tstr[strlen(tstr) - 1] = '\0';
-
        switch (config_type) {
        case CONFIG_TYPE_SH:
 
                aura_dict_rewind(cvs->d);
                while (!aura_dict_eof(cvs->d)) {
-                       if (! conf_written) {
-                               conf_written = 1;
-                               fprintf(f, "\n");
-                               fprintf(f, "# -- BEGIN %s "
-                                   "Installer automatically generated "
-                                   "configuration  -- #\n",
-                                   OPERATING_SYSTEM_NAME);
-                               fprintf(f, "# -- Written on %s -- #\n", tstr);
-                       }
                        aura_dict_get_current_key(cvs->d, &rk, &rk_len),
                        aura_dict_fetch(cvs->d, rk, rk_len, &rv, &rv_len);
-                       fprintf(f, "%s=\"%s\"\n", (char *)rk, (char *)rv);
+                       fprintf(f, "%s=\"%s\"\t# via installer configuration\n",
+                           (char *)rk, (char *)rv);
                        aura_dict_next(cvs->d);
                }
-               if (conf_written) {
-                       fprintf(f, "# -- END of %s Installer "
-                           "automatically generated configuration -- #\n",
-                           OPERATING_SYSTEM_NAME);
-               }
                break;
        case CONFIG_TYPE_RESOLV:
                aura_dict_rewind(cvs->d);