]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
config: post-process default config options too
authorSage Weil <sage@newdream.net>
Thu, 29 Apr 2010 18:56:49 +0000 (11:56 -0700)
committerSage Weil <sage@newdream.net>
Thu, 29 Apr 2010 18:57:38 +0000 (11:57 -0700)
Previously we were only doing the ones we read out of the .conf.

src/config.cc

index 3cb17f8b1be90dfc1ce925e5230c2abfb4218992..51e8e11bfb194985f85adb79e807f01ec858a6e9 100644 (file)
@@ -1038,6 +1038,17 @@ void parse_startup_config_options(std::vector<const char*>& args, bool isdaemon,
     cf = NULL;
   }
 
+  // do post_process substitutions
+  int len = sizeof(config_optionsp)/sizeof(config_option);
+  for (int i = 0; i<len; i++) {
+    config_option *opt = &config_optionsp[i];
+    if (opt->type == OPT_STR && opt->val_ptr) {
+      if (*(char**)opt->val_ptr) {
+       *(char **)opt->val_ptr = conf_post_process_val(*(char **)opt->val_ptr);
+      }
+    }
+  }
+
   // open new conf
   string fn = g_conf.conf;
   list<string> ls;